![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Angular开发学习笔记
JustWantToFly
我什么都会,就是不会改bug,咬我啊
展开
-
开发学习笔记:ionic 钩子事件 / ionic页面加载方法
ionViewDidLoad void 页面加载时运行。这个事件只在每个页面创建时发生一次。如果页面离开但被缓存,则该事件在后续查看时不会再次触发。该ionViewDidLoad事件是放置您的页面设置代码的好地方。 ionViewWillEnter void 当页面即将进入并成为活动页面时运行。 ionViewDidEnter void 当页面完全进入并且现在是活动页面时运行。无论是第一次加载还是缓存页面,此事件都会触发。 ionViewWillLeav...转载 2020-05-14 21:37:31 · 250 阅读 · 0 评论 -
Angular开发学习笔记:Angular父子组件之间的传值
父组件向子组件传值 @Input文件目录父组件:father.template.html<h1>父组件</h1><cmt-child [data]='data'></cmt-child>father.component.tsimport { Component, OnInit } from '@angula...转载 2019-12-30 18:50:02 · 158 阅读 · 0 评论 -
Angular开发学习笔记:Angular 正确使用 @ViewChild、@ViewChildren 访问 DOM、组件、指令
Angular 正确使用 @ViewChild、@ViewChildren 访问 DOM、组件、指令 @ViewChild和@ViewChildren是Angular提供给我们的装饰器,用于从模板视图中获取匹配的元素。需要注意的是@ViewChild和@ViewChildren会在父组件钩子方法ngAfterViewInit调用之前赋值。接下来我们来看下@ViewChild、@Vi...转载 2019-12-30 19:51:33 · 554 阅读 · 0 评论 -
Angular开发学习笔记:Angular自定义组件实现数据双向绑定
angular6 自定义组件,实现双向数据绑定在包装输入类型的组件时,我们需要向外暴露数据接口,用户输入和输出,这时候在组件内部定义双向绑定,会大大方便用户的使用。在编写组件之前,首先看一下组件的使用方式和效果:<binding-test [(userName)]="testBinding"></binding-test><p>app.compo...转载 2019-12-30 16:30:30 · 533 阅读 · 0 评论 -
Angular开发学习笔记:字符串与时间类型的转换
1.字符串时间格式的互转SubmitData(data: any) { // let AccountDate = new Date(data.AccountDate); let AccountDate = new Date('2019/11/26'); console.log('当前AccountDate数据:', AccountDate); console....原创 2019-11-26 19:15:41 · 1292 阅读 · 0 评论 -
AngularJS开发学习笔记:父子作用域之间的通信—$on、 $emit、$broadcast的介绍
angularJs中的作用域($scope)结构和DOM结构非常相似,也是一个层次分明的树状结构。它有一个根作用域$rootscope(对应angular应用或ng-app),其他作用域是嵌套在根作用域下面的。angularJs的$scope之间都遵循js中对象原型继承方式,当子作用域中没有该对象时,默认向上级作用域(父作用域)寻找,直到找到或者到达$rootscope为止,当子作用域有该...转载 2019-11-02 10:52:26 · 326 阅读 · 0 评论 -
AngularJS开发学习笔记:angular中控制器之间传递参数的方式
angular中控制器之间传递参数的方式在angular中,每个controller(控制器)都会有自己的$scope,通过为这个对象添加属性赋值,就可以将数据传递给模板进行渲染,每个$scope只会在自己控制器内起作用,而有时候需要用到其他控制器中的数据,这个时候就要考虑到控制器之间参数的传递了。1.通过$rootscope传参首先,在angular中存在作用域的继承,继承作用域符合...转载 2019-11-01 19:46:30 · 588 阅读 · 0 评论 -
AngularJS开发学习笔记:Angular.forEach用法
Angular.forEach用法1.针对对象循环(key,value)官方示例:var values = {name: 'misko', gender: 'male'};var log = [];angular.forEach(values, function(value, key) { this.push(key + ': ' + value);}, log);exp...转载 2019-11-01 18:39:22 · 398 阅读 · 0 评论 -
AngularJS开发学习笔记:ionic 使用日期选择框ionic-datepicker插件
转载自:https://jingyan.baidu.com/article/92255446651ac3851648f438.html 你可以使用bower工具去安装ionic-datepicker插件(对bower工具无感),我这里介绍在ionic项目里直接去安装插件。首先直接去github代码仓库下载js文件ionic-datepicker.bundle.min.js。 Git...转载 2019-06-25 09:01:42 · 831 阅读 · 0 评论 -
AngularJS开发学习笔记:AngularJS 参考手册
转载自:https://www.runoob.com/angularjs/angularjs-reference.htmlAngularJS 指令本教程用到的 AngularJS 指令 :指令 描述 ng-app 定义应用程序的根元素。 ng-bind 绑定 HTML 元素到应用程序数据 ng-bind-html 绑定 HTML 元素的 inn...转载 2019-06-19 14:06:12 · 212 阅读 · 0 评论