随笔分类 -  angular

angularJs 相关
摘要:Install Node.js Install Angular CLI sudo npm install -g @angular/cli Install Node.js Install Angular CLI Set-up new app ng new my-first-app Run Server 阅读全文
posted @ 2017-05-07 20:10 Hardi 阅读(138) 评论(0) 推荐(0)
摘要:component is a kind of a directive normally we use attribute selector *ngIf="data" @Component({ selector: 'ng-if-else', template: ` <button (click)="s 阅读全文
posted @ 2017-05-04 21:26 Hardi 阅读(174) 评论(0) 推荐(0)
摘要:String Interpolation String Interpolation out put variables in the template file Property Binding Property Binding edit name.component.ts Event Bindin 阅读全文
posted @ 2017-05-03 20:19 Hardi 阅读(127) 评论(0) 推荐(0)
摘要:How to create a new component manually How to create a new component manually How to create a component from CLI ng generate component name or ng g c 阅读全文
posted @ 2017-05-03 17:27 Hardi 阅读(176) 评论(0) 推荐(0)
摘要:利用angularJS中service单例模式的特性,服务(service)提供了一种能在应用的整个生命周期内保持数据的方式,能够在控制器之间进行通信,且能保证数据的一致性。 一般我们都会封装server来为应用提供访问数据的接口,或者跟远程进行数据交互。 示例 JavaScript var myA 阅读全文
posted @ 2016-03-01 22:32 Hardi 阅读(5028) 评论(0) 推荐(0)