![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
angular
七彩猫猫虫
这个作者很懒,什么都没留下…
展开
-
大组件自整理-pad端
1、 表格初始头:用户登录html:<span class="fontsize">统计完成:</span> <user-confirm-input (userConfirmed)="userConfirmed()" [title]="'记录者'" [(ngModel)]="confirmPerson" name="'confirmPerson'"...原创 2020-06-17 09:23:25 · 630 阅读 · 0 评论 -
大组件自整理-pc端
初始路由配置注:下面三步顺序可以打乱第一步D:\11\check-manage-ui\src\app\routes\checkcell\task\checklist-routing.module.ts第二步新建要做的大组件的文件夹上面路由中的的MmFormCs4L0001031Component组件就是ts里的:第三步在checklist.module.ts中配置组件...原创 2020-06-17 09:22:59 · 475 阅读 · 0 评论 -
angular-自定义管道
1、创建自定义管道:ng g pipe 目标文件夹/管道名字 (使用命令行创建,会自动在根模块文件中挂载)2、配置管道文件:fangda.pipe.tsimport { Pipe, PipeTransform } from '@angular/core';@Pipe({ name: 'fangda'})export class FangdaPipe implements Pip...原创 2020-03-23 17:50:25 · 261 阅读 · 0 评论 -
angular-子传父/父组件使用子组件数据和方法
父组件:News 子组件:Footer方法一:ViewChildapp.component.html:<app-news></app-news>news.component.html:<app-footer #footer></app-footer><br><hr><div>我是一个新闻组件...原创 2020-03-19 18:04:52 · 652 阅读 · 0 评论 -
angular-父组件给子组件传值
app.component.html:<app-home></app-home>home.component.html:<app-header [title]="title" [msg]="msg" //数据[run]=run //方法[home]=this //整个父组件></app-header>...原创 2020-03-19 17:39:09 · 346 阅读 · 0 评论 -
angular-数据持久化
storage.service.ts文件import { Injectable } from '@angular/core';@Injectable({ providedIn: 'root'})export class StorageService { constructor() { } set(key:string,value:any){ localStorag...原创 2020-03-19 17:31:50 · 398 阅读 · 1 评论