向angular指令传参
来源:互联网 发布:mac解压缩软件 编辑:程序博客网 时间:2024/06/06 09:14
https://segmentfault.com/q/1010000005837178
<div ng-controller="DemoCtrl">
<ng-table data="list"></ng-table>
</div>
var demo = angular.module('demo', []);
demo.directive('ngTable', function(){
return {
restrict: 'E',
scope: {
data: '='
},
link: function($scope, element, attrs){
},
template: '<table><tr ng-repeat="item in data"><td>{{ item.id }}</td><td>{{ item.name }}</td></tr></table>'
};
});
demo.controller('DemoCtrl', function($scope){
$scope.list = [
{
id: 123,
name: 'Hello World'
},{
id: 234,
name: 'Fucking world'
},{
id: 345,
name: 'What did you say?'
}
];
});
0 0
- 向angular指令传参
- angular指令
- angular指令
- angular指令
- Angular 指令
- angular指令和自定义指令
- angular 自定义指令
- Angular.js 指令 & Controller
- 什么是angular js指令
- 创建angular js指令
- Angular指令编译原理
- angular js自定义指令
- angular指令例子
- 深入理解Angular指令
- Angular自定义指令(进阶)
- Angular Light 指令用法
- angular的基本指令
- angular自定义指令
- 第十三周【项目四-Floyd算法验证】
- 点击删除
- 实验二--任务三--理解Task
- 第十三周--kruskal算法的验证
- Insertion Algorithm
- 向angular指令传参
- Android开发--开发技巧之Live Templates
- 一个简单的TCP服务器
- 使用过的好工具
- (写给初学者)静态页面和动态页面的区别
- C# webService服务
- 第十三周项目(2)——Kruskal算法的验证
- 第十三周项目(2)验证Kruskal算法
- Git repository of Frank Liu--Frank Liu的Git仓库