Home  >  Article  >  Web Front-end  >  ionic unordered list

ionic unordered list

黄舟
黄舟Original
2017-02-16 14:15:081020browse

1. Example background

ionic unordered list is implemented using ul-li, the content of the unordered list is assigned using AngularJS, and the style uses class="list "and class="item"


##2. Implement 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/angular/angular.js" ></script>
		<script type="text/javascript" src="../js/ionic.bundle.js" ></script>
		<script>
			var app = angular.module("ulApp",["ionic"]);
			app.controller("ulController",function($scope){
				$scope.uls = ["春季","夏季","秋季","冬季"];
			});
		</script>
	</head>
	<body ng-app="ulApp" ng-controller="ulController">
		<p style="padding: 100px;">
			<ul class="list">
				<li class="item" ng-repeat="u in uls">{{u}}</li>
			</ul>
		</p>
	</body>
</html>

3. Achieve results

ionic unordered list

## The above is the content of ionic, unordered list, and JavaScript. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement:
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
Previous article:ionic style checkboxNext article:ionic style checkbox