angularjs 基本功能

 

//输出

 {{id }}

//格式化时间

{{time | date:'yyyy.MM.dd'}}

//for 循环

<li ng-repeat="menu in menus">

// 绑定对象

<input type=”text” ng-model=’password’>

//绑定点击时间

<button ng-click=”btnClick()”/>

//switch 判断

<span ng-switch on=”person.sex”>
<span ng-switch-when=”1〃>you are a boy</span>
<span ng-switch-when=”2〃>you are a girl</span>

//if 判断 

<span ng-if=”person.sex==1〃>you may be a father</span>

 

posted on 2016-04-27 11:39  Yangguang.Liu  阅读(144)  评论(0编辑  收藏  举报