Home > Web Front-end > JS Tutorial > body text

Simple example of ionic

黄舟
Release: 2017-02-17 14:12:11
Original
1738 people have browsed it

1. Example background

ionic is based on AngularJS and is a framework. According to AngularJS two-way binding variables, dynamically obtain values.


2. Implementation source code

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>ionic之简单实例</title>
		<link rel="stylesheet" href="../css/ionic.css" />
		<script type="text/javascript" src="../js/ionic.bundle.js" ></script>
		<script>
			var app = angular.module("tagApp",["ionic"]);
			app.controller("tagController",function($scope){
				$scope.username = "李海";
			});
		</script>
	</head>
	<body ng-app="tagApp" ng-controller="tagController">
		<ion-header-bar class="bar-positive">
			<label class="title">欢迎使用ionic</label>
		</ion-header-bar>
		<ion-content>
			<span>{{username}}</span>
		</ion-content>
	</body>
</html>
Copy after login


3. Implementation results

Simple example of ionic

# The above is the content of a simple example of ionic. For more related content, please pay attention to the PHP Chinese website ( www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template