该模板由本文件夹中的代码以及asset中的basic共同组成。
npm install -s bootstrap@4.6.0
npm install -s @fortawesome/fontawesome-free@5.15.3
- 引入样式表
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.css",
"./node_modules/@fortawesome/fontawesome-free/css/all.css",
"src/styles.scss"
]
-
add header
-
使用方法
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { BasicComponent, ThemeService } from '../../projects/theme/src/public-api';
export class MyThemeService extends ThemeService {
// 在此复写
}
@Component({
selector: 'app-root',
standalone: true,
imports: [BasicComponent],
template: `
<theme-basic>
<h1>hello</h1>
</theme-basic>`,
providers: [
{
provide: ThemeService, useClass: MyThemeService
}
]
})
export class AppComponent {
title = 'angular19';
}