- 博客(3)
- 收藏
- 关注
翻译 AngularJS 数据绑定
1、数据->模板数据到表现的绑定,主要是使用模板标记直接完成的: <p>{{ w }} x{{ h }}</p>使用 {{ }}这个标记,就可以直接引用,并绑定一个作用域内的变量。在实现上, ng 自动创建了一个 watcher。效果就是,不管因为什么,如果作用域的变量发生了改变,我们随时可以让相应的页面表现也随之改变。我们可以看一个更纯粹的例子: <p id=...
2018-06-16 10:23:22
192
翻译 Angularjs笔记摘要2--directive
首先给出一段代码:angular.module('docsTransclusionExample',[]).controller('Controller', ['$scope', function($scope) { $scope.name = 'Tobias';}]).directive('myDialog', function(){ return { restrict: 'E', ...
2018-06-16 10:20:44
101
原创 Angularjs笔记摘要1
1.1 module, directive, expressionmoudle:app.js:var app =angular.module('store',[]); (angularJS) (app name) (dependencies Other libraries we might need.) In HTMLfile, we need to add <htm...
2018-06-16 09:55:25
147
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人