赞
踩
<tr ng-repeat="item in intems"><td>{
{
item.id}}<td>{
{
item.name}}<td><tr>
<select ng-model="",ng-options="item.id as (item.name) in items"></select>
<input type="text" ng-model="person.name"/>
<div ng-switch on="person.name">
<p ng-switch default>And the winner is</p>
<h1 ng-switch-when="Ari">{
{ person.name }}</h1>
</div>
语法:管道字符(|)+过滤器名称。
demo:
<div ng-app="myApp" ng-controller="myCtrl">
名: <input type="text" ng-model="firstName"><br>
名: <input type="text" ng-model="lastName"><br>
<br>
姓名: {
{
firstName + " " + lastName}}
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstName = "John";
$scope.lastName = "Doe";
});
</script>
Angular.module(“appname”,function(
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。