PhoneGap中文网

 找回密码
 立即注册
PhoneGap中文网 视频教程 angularjs教程 查看内容

第六讲 Angularjs 事件指令 input相关指令 和样式指令 DOM操作指令详解 ... ... ...

2015-5-4 21:27| 发布者: admin| 查看: 4520| 评论: 0

摘要: angularjs+ionic 免费教程下载地址:http://bbs.phonegap100.com/thread-1574-1-1.html学习要点:1.AngularJs 事件指令2.input相关指令3.样式指令4.DOM操作指令5.ngBind/ngBindHtml/ngBindTemplate/ ngInclude 重点6 ...


angularjs+ionic 免费教程下载地址:


http://bbs.phonegap100.com/thread-1574-1-1.html



学习要点:
1. AngularJs 事件指令
2. input相关指令
3. 样式指令
4. DOM操作指令
5. ngBind/ngBindHtml/ngBindTemplate/ ngInclude    重点
6. ng-init  ng-mode  ng-model-options ng-controler

 
主讲教师:(树根)

合作网站:www.phonegap100.com (phonegap中文网)
合作网站:www.itying.com  (IT营)


1. Angularjs 事件指令


自己研究:
ng-click/dbclick
ng-mousedown/up
ng-mouseenter/leave
ng-mousemove/over/out
ng-keydown/up/press
ng-focus/blur
ng-submit


 重点讲述:

 ng-selected
ng-change
ng-copy
ng-cut
ng-paste

ng-cloak     在angular中为我们提供了ng-cloak来实现纺织闪烁的方案,我们只需要在需要的地方加上ng-cloak。同时对于bing文字({{ express }} )我们也可以改为ng-bind来实现避免。

ng-non-bindable 如果我们就想要一个{{}} 这样的内容就可以使用 ng-clock
   
 
2. Angularjs  input相关指令

ng-disabled
ng-readonly
ng-checked
ng-value
      


3. Angularjs  样式指令

ng-class
ng-style
ng-href
ng-src
ng-attr-(suffix)   html中属性可能有多了  angularjs 提供了一种通用的写法

如:ng-attr- href
 
4. Angularjs  DOM操作指令
 

ng-show     display 隐藏显示

aaaaaaaaaaaa

ng-if   dom操作

aaaaaaaaaaaa

ng-switch

             


5. Angularjs  ngBind/ngBindHtml/ngBindTemplate/ ngInclude


ngBind    显示数据类似于 {{}}

ngBindTemplate    解决ng-bind中只能绑定一个的问题

ngBindHtml   解析html代码 

1. 引入js代码

2. 在module 中引入一下插件 var app = angular.module("myApp", ['ngSanitize']);

ngInclude    加载外部页面

6. ng-init  ng-mode  ng-model-options   ng-controler

ng-init


 

   

       list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};
   

 


ng-mode






无标题文档






   
{{a1.text}}:{{a1.show()}}




ng-model-options   控制双向事件绑定的时候 触发事件的方式


 

    Name:
               ng-model="user.name"
           ng-model-options="{ updateOn: 'blur' }"
           ng-keyup="cancel($event)" />

    Other data:
   

 


 
user.name = 

ng-controler



头晕

难过

扯淡

不解

搞笑

支持

超赞

欠扁

相关阅读

最新评论

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-3-28 18:10 , Processed in 0.030641 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回顶部