ng-alain的使用
NG-ALAIN
介绍
ng g
1 | ng g ng-alain:module xxx |
使用iconfont
第一步:iconfont 生成js在线链接
第二步:在startup.service.ts中引入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 >// src/app/core/startup/startup.service.ts
>export class StartupService {
constructor(
iconSrv: NzIconService,
private menuService: MenuService,
private translate: TranslateService,
private i18n: I18NService, (ALAIN_I18N_TOKEN)
private settingService: SettingsService,
private aclService: ACLService,
private titleService: TitleService,
private tokenService: ITokenService, (DA_SERVICE_TOKEN)
private httpClient: HttpClient,
private injector: Injector
) {
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
// 使用iconfont
iconSrv.fetchFromIconfont({
scriptUrl: 'https://at.alicdn.com/t/font_2670501_nkbj7jrr0sp.js'
})
}
第三步:在组件中使用
1
2
3
4
5 ><i nz-icon nzIconfont="icon-tubiaozhizuomoban-09"></i>
><!--
nz-icon
nzIconfont
-->
自定义管道
运行ng g pipe pipes/xxx -m=shared
@delon/mock
数据存放位置_mock/_user.ts
1 | export const USERS = { |
ellipsis 文本自动省略号组件
功能:
- 按行数省略
- 按字符数省略
- 自定义省略显示字符
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Kenis!
评论