欢迎关注github:https://github.com/myopenresources
angular版 模版插座指令
安装
npm install cc-custom-tpl --save 或 yarn add cc-custom-tpl
使用
//========string-template-outlet========
// 业务模块
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CustomTemplateModule } from 'cc-custom-tpl';
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
@NgModule({
本文介绍了如何在Angular中使用cc-custom-tpl库实现模板插座功能。通过安装和引入CustomTemplateModule,可以使用*ccStringTemplateOutlet和*ccTemplateOutlet指令插入字符串模板或模板引用。示例展示了在业务组件和header组件中如何应用这些指令。
订阅专栏 解锁全文
2万+

被折叠的 条评论
为什么被折叠?



