我的删除情况,可单独删除一条任务,也可以根据类别删除(类别和所属此类别的任务集合)。首先页面 task.ng.html TaskController$scope.ok = function (task) { $scope.tasks.remove(task);};Type.ng.htmlT...
分类:
其他好文 时间:
2015-10-28 14:22:38
阅读次数:
165
收藏:需加angular.js文件 users {{user.name}} {{user.weight}} ...
分类:
Web程序 时间:
2015-10-28 14:14:43
阅读次数:
161
import {Input, Component, View, NgClass} from "angular2/angular2";@Component({ selector: 'todo-item-render'})@View({ directives: [NgClass], s...
分类:
其他好文 时间:
2015-10-28 07:00:49
阅读次数:
197
Style and View Encapsulation is best understood by seeing how each option (Emulated, Native, and None) compare to each other. Angular 2 QuickStart ...
分类:
其他好文 时间:
2015-10-28 07:00:19
阅读次数:
223
father||-html|-directivechild||-html|-directive在child的html中,引用father的指令即可。
分类:
其他好文 时间:
2015-10-28 01:42:43
阅读次数:
139
@野兽的 ng api 学习 --angular.uppercase和angular.lowercaseangular.uppercase将指定的字符串转换成大写格式:angular.uppercase(string);string:被转换成大写的字符串。使用代码: var str = "ABCab...
@野兽的 ng api 学习 -- angular.copyangular.copy针对对象或数字创建一个深层的拷贝。格式:angular.copy(source,[destination]);source:被拷贝的对象destination:接收的对象 [注意:参数类型是对象或数组]使用代码: v...
transclusion 指的是定义模版的元素如何处理问题。在使用它的时候,需要在两个地方说明,一是在指令中说明需要嵌入,二是在模版中说明嵌入到哪里。元素部分: 12345678js部分:var myModule = angular.module('myModule',[]);myModule...
分类:
其他好文 时间:
2015-10-27 16:45:15
阅读次数:
345
指令的使用范围restrict 的取值可以有三种:A 用于元素的 Attribute,这是默认值E 用于元素的名称C 用于 CSS 中的 class比如说,我们这样定义指令。var app = angular.module("app", []) .directive("hello", func...
分类:
其他好文 时间:
2015-10-27 13:01:19
阅读次数:
120
@野兽的 ng api 学习 -- angular.bootstrapangular.bootstrap使用这个功能来手动启动angular应用。基于ngScenario的端对端测试不能使用bootstrap手动启动,需要使用ngApp.Angular会检测应用在浏览器是否已启动并且只允许第一次的启...