随笔分类 - Angular
摘要:Let's say you want to write a simple data bing app. when you type in a text box, somewhere in the application will show the result.In Angular 1, you c...
阅读全文
摘要:JS Bin var Note = angular .Component({ selector: 'note' }) .View({ template: 'World' }) .Class({ co...
阅读全文
摘要:Angular 2 introduces a new event syntax for connecting events on the DOM to your controllers.function Clicker() { this.counter = 0; this.x = 0; ...
阅读全文
摘要:function Clock() { var clock = this; clock.time = 0; clock.message = "This is the message"; setInterval(function() { clock.time++; ...
阅读全文
摘要:JS Bin function Note() {}Note.annotations = [ new angular.ComponentAnnotation({ selector: 'note' }), new angular.ViewAn...
阅读全文
摘要:Before we get too much further, we should mention that putting our model (array) directly in our controller isn't proper form. We should separate the ...
阅读全文
摘要:You can then use this array in your template with theNgFordirective to create copies of DOM elements with one for each item in the array.//Typescriptt...
阅读全文
摘要:Child compoment should be defined before the parent component.Notice that in addition to using theelement in the parent template, you also need to add...
阅读全文
摘要:This quickstart shows how to write your Angular components in TypeScript.To get the benefits of TypeScript, we want to have the type definitions avail...
阅读全文