You need to define a <template> to be able to use it elsewhere in your app as a TemplateRef. You can store these TemplateRefs in a Service and then access them from any @Directive or @Component in your app. We want to create a service and a componen
The nitty-gritty of compile and link functions inside AngularJS directives The nitty-gritty of compile and link functions inside AngularJS directives part 2: transclusion [译]ng指令中的compile与link函数解析 AngularJS directives are amazing. They allow you to
In this tutorial we are going to learn how to use the Angular 2 router to pass optional query parameters from one route into another route. There are couple of ways of doing this from the source route perspective: we use the queryParams property in t
---------------------------Scope-------------------------------- https://docs.angularjs.org/guide/scope What are Scopes? Scope is an object that refers to the application model. It is an execution context for expressions. Scopes are arranged in hiera