Just like passing in an array to *ngFor, you can pass in any value into your structural directive so that it can render templates based on those values. It's crucial to understand how the *directive syntax expands into a <template> and adds a custo…
一.directive中的scope directive无疑是AngularJS中比较复杂难懂的部分,而directive中个scope更是其中最复杂的部分了,尤其是在嵌套directive中互相通讯的时候. 单独的directive中,scope概念还是比较简单的,此时scope的三种取值情况为: scope:false  此时,directive没有独立的scope对象,link函数中引用的scope对象来自于当前节点的默认controller scope:true  此时,directiv…
传统的 angular 应用不支持异步加载模块,必须在 module 启动的时候,所有模块必须预加载进来. 通过使用 angular-async-loader 库,我们可以使用 requirejs 等加载器,在 module 初始化之后,在动态异步加载其他的 Controller, Services, Filters 等等... Angular.JS + Require.JS + angular-async-loader 来实现异步加载 angular 模块…
FIELD OF INVENTION This invention relates to computer graphics processing, and more specifically to computer graphics processing using two or more architecturally distinct graphics processors. BACKGROUND OF INVENTION Many computing devices utilize hi…
原文: http://blog.thoughtram.io/angularjs/2015/01/02/exploring-angular-1.3-bindToController.html Angular1.2引入了新的语法 controllerAs, 它让scope更加清楚.干净, 让controller更加聪明. 在我们的Angular应用中使用controllerAs可以避免开发者经常遇到的一些问题. controllerAs 做为命名空间 让我们用代码说事,有两个controller如下…
<!DOCTYPE html> <html ng-app="MyApp"> <head> <title>Study 9</title> <script type="text/javascript" src="js/angular.js"></script> </head> <body> <div ng-controller="…
The post we have: http://www.cnblogs.com/Answer1215/p/4185504.html gives a breif introduce about bindToController on the directive. Here is a blog about bindToController from thoughtramwhich explains in detail why bingToController comes into handy an…
Just like in *ngFor, you're able to pass in data into your own structural directives. This is done by declaring the variable using a let statement then passing context into the createEmbeddedView call. We know *ngFor we did like this: *ngFor="let mes…
在angular中,Directive,自定义指令的学习,可以更好的理解angular指令的原理,当angular的指令不能满足你的需求的时候,嘿嘿,你就可以来看看这篇文章,自定义自己的指令,可以满足你的各种需求的指令. 本篇文章的参考来自  AngularJS权威指南 , 文章中主要介绍指令定义的选项配置 废话不多说,下面就直接上代码 //angular指令的定义,myDirective ,使用驼峰命名法 angular.module('myApp', []) .directive('myDi…
Structural directives enable you to use an element as a template for creating additional elements. Creating structural directives requires a knowledge of <template> elements, but they're easy and extremely powerful once you undrestand the concepts.…