随笔分类 -  905 Angular

1 2 下一页

Angular 项目打包之后,部署到springboot项目中,刷新访问404解决方法
摘要:解决方法1: app.module.ts文件添加两行代码: 解决方法2: 在springboot项目application中添加 阅读全文

posted @ 2019-09-18 11:47 LoaderMan 阅读(1005) 评论(0) 推荐(0)

angular ts处理日期格式
摘要:引入DatePipe 添加provider 添加到构造方法中 使用: 日期的比较: 阅读全文

posted @ 2019-07-30 15:28 LoaderMan 阅读(1460) 评论(0) 推荐(0)

Angular中使用ECharts图表
摘要:1.安装: 2.在 TypeScript 文件中导入echarts 3.根据官方demo和API,开发自己的需求即可 https://www.echartsjs.com/examples/4.html布局 5.ts代码 效果: 阅读全文

posted @ 2019-07-28 20:14 LoaderMan 阅读(6886) 评论(0) 推荐(1)

Angular 自定义模块以及配置路由实现模块懒加载
摘要:项目目录 创建模块 ng g module module/user --routing ng g module module/article --routing ng g module module/product --routing 创建组件 ng g component module/user 阅读全文

posted @ 2019-05-24 13:41 LoaderMan 阅读(2407) 评论(6) 推荐(0)

Angular 自定义模块
摘要:创建自定义模块 app.module.ts user.moudle.ts 阅读全文

posted @ 2019-05-24 10:28 LoaderMan 阅读(1462) 评论(0) 推荐(0)

angular 中父子路由
摘要:1. 创建组件引入组件 import { NewsaddComponent } from './components/newsadd/newsadd.component'; import { NewslistComponent } from './components/newslist/newsli 阅读全文

posted @ 2019-05-23 15:32 LoaderMan 阅读(968) 评论(0) 推荐(0)

angular中的动态路由
摘要:1.配置动态路由 const routes: Routes = [ {path: 'home', component: HomeComponent}, {path: 'news', component: NewsComponent}, {path: 'newscontent/:id', compon 阅读全文

posted @ 2019-05-23 15:31 LoaderMan 阅读(4423) 评论(0) 推荐(0)

Angular中的routerLink 跳转页面和默认路由
摘要:1.创建新项目 2.创建home news newscontent 组件 3.找到app-rounting-moudle.ts配置路由 1)引入组件 2)配置路由 4. 找到 app.component.html 根组件模板,配置 router-outlet 显示动态加载的路由 Angular ro 阅读全文

posted @ 2019-05-23 15:22 LoaderMan 阅读(5806) 评论(0) 推荐(0)

Angular 中的数据交互(get jsonp post)
摘要:一、Angular get 请求数据 Angular5.x 以后 get、post 和和服务器交互使用的是 HttpClientModule 模块。 1、在 app.module.ts 中引入 并注入 import {HttpClientModule} from '@angular/common/h 阅读全文

posted @ 2019-05-23 14:15 LoaderMan 阅读(753) 评论(0) 推荐(0)

angular之Rxjs异步数据流编程入门
摘要:Rxjs介绍 参考手册:https://www.npmjs.com/package/rxjs 中文手册:https://cn.rx.js.org/ RxJS 是 ReactiveX 编程理念的 JavaScript 版本。ReactiveX 来自微软,它是一种针对异步数据 流的编程。简单来说,它将一 阅读全文

posted @ 2019-05-22 15:33 LoaderMan 阅读(988) 评论(0) 推荐(0)

Angular 中的生命周期函数
摘要:一、 Angular中的生命周期函数 官方文档:https://www.angular.cn/guide/lifecycle-hooks 生命周期函数通俗的讲就是组件创建、组件更新、组件销毁的时候会触发的一系列的方法。 当 Angular 使用构造函数新建一个组件或指令后,就会按下面的顺序在特定时刻 阅读全文

posted @ 2019-05-21 17:22 LoaderMan 阅读(2057) 评论(0) 推荐(1)

angular父组件通过@ViewChild 主动获取子组 件的数据和方法
摘要:1.调用子组件给子组件定义一个名称 <app-footer #footerChild></app-footer> 2. 引入 ViewChild import { Component, OnInit ,ViewChild} from '@angular/core'; 3. ViewChild 和刚才 阅读全文

posted @ 2019-05-21 16:12 LoaderMan 阅读(1461) 评论(0) 推荐(0)

angular中子组件通过@Output 触发父组件的方 法
摘要:1. 子组件引入 Output 和 EventEmitter import { Component, OnInit ,Input,Output,EventEmitter} from '@angular/core'; 2.子组件中实例化 EventEmitter @Output() private o 阅读全文

posted @ 2019-05-21 16:04 LoaderMan 阅读(3181) 评论(0) 推荐(0)

angular中父组件给子组件传值-@input
摘要:1. 父组件调用子组件的时候传入数据 <app-header [msg]="msg"></app-header> 2. 子组件引入 Input 模块 import { Component, OnInit ,Input } from '@angular/core'; 3. 子组件中 @Input 接收 阅读全文

posted @ 2019-05-21 14:27 LoaderMan 阅读(2303) 评论(0) 推荐(0)

Angular 执行 css3 简单的动画
摘要:效果: 阅读全文

posted @ 2019-05-21 10:56 LoaderMan 阅读(486) 评论(0) 推荐(0)

Angular 中的 dom 操作(ViewChild)以及父子组件中通过 ViewChild 调用子组件的方法
摘要:效果: 阅读全文

posted @ 2019-05-21 10:35 LoaderMan 阅读(1774) 评论(0) 推荐(0)

angular 中的dom操作(原生JS)
摘要:效果: 阅读全文

posted @ 2019-05-21 10:29 LoaderMan 阅读(471) 评论(0) 推荐(0)

angular中的服务和持久化实现
摘要:1.创建服务: ng g service my-new-service 创建到指定目录下面 ng g service services/storage 编写storage.service.ts代码: import { Injectable } from '@angular/core'; @Injec 阅读全文

posted @ 2019-05-20 17:35 LoaderMan 阅读(347) 评论(0) 推荐(0)

angular 管道
摘要:效果图: 阅读全文

posted @ 2019-05-20 16:42 LoaderMan 阅读(1116) 评论(0) 推荐(0)

angular 中的[ngClass]、[ngStyle]
摘要:效果: 阅读全文

posted @ 2019-05-20 16:25 LoaderMan 阅读(2355) 评论(0) 推荐(0)

1 2 下一页

导航