
angular
文章平均质量分 50
雨若雪汐
Tomorrow is another day.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
angular2+中组件通信(组件交互)的几种方式
组件通信及两个或者多个组件之间共享信息的方法;组件之间通信分为以下几种情况: 1、父组件向子组件传递数据; 2、 子组件向父组件传递数据; 3、非嵌套组件之间的通信;下面将详细说明如何实现这几种通信父组件向子组件传递数据:属性绑定方式([属性名]) 子组件中通过@Input 装饰器自定义属性,父组件绑定这个属性。 子组件实现:import { Component, OnInit,...原创 2018-05-11 15:39:23 · 5179 阅读 · 1 评论 -
label中嵌套input时,在label上绑定click()事件执行两次(angular2+,javascript)
//html<label class="radio-inline" (click)="onLabel()"> <input type="radio" name="optionsRadiosinline"/> radio</label>onLabel(){ console.log('label1')}//结果label1label1原创 2018-06-11 15:43:35 · 1516 阅读 · 0 评论 -
TS 判断字符串是否为手机号码
/** * 字符串的相关操作 */import {isNull, isUndefined} from "util";export class StringUtils{ public static isEmpty(str: string){ if(isUndefined(str)){ return true; } if...原创 2018-05-30 11:22:33 · 6429 阅读 · 0 评论 -
angular时间json导出为excel,使用xsls
1、在angular应用程序中按照 xlsx file-saver npm install xlsx --save //当前使用的版本 0.13.3//编写angular - service代码import {Injectable} from '@angular/core';import * as XLSX from 'xlsx';@Injectable()export cl...原创 2017-08-22 11:12:20 · 1800 阅读 · 2 评论 -
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked,angular
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'dateObj: undefined'. Current value: 'dateObj: [object Object]'.大概意思:在内容改变的时候视...原创 2018-08-20 19:14:37 · 3207 阅读 · 0 评论 -
angular组件之生命周期钩子以及子父组件之间生命周期钩子执行顺序
angular每个组件都有被一个Angular管理得生命周期;当Angular使用构造函数新建一个指令后,按照下面额顺序执行生命周期钩子;画线的为主要用到的生命周期钩子。2、关于子父组件生命周期钩子的调用顺序问题;下面根据结论,实践结果...原创 2019-03-21 11:10:45 · 3504 阅读 · 0 评论