import { Component, OnInit } from '@angular/core'; import { HighlightResult } from 'ngx-highlightjs'; @Component({ selector: 'app-layer2-banner', templateUrl: './layer2-banner.component.html', styleUrls: ['./layer2-banner.component.scss'] }) export class Layer2BannerComponent implements OnInit { constructor() { } response: HighlightResult; code = `import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { DefaultComponent } from './layout/default/default.component'; import { IconsProviderModule } from './icons-provider.module'; import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { registerLocaleData } from '@angular/common'; import zh from '@angular/common/locales/zh'; import { HighlightModule } from 'ngx-highlightjs'; registerLocaleData(zh); @NgModule({ declarations: [ AppComponent, DefaultComponent ], imports: [ BrowserModule, AppRoutingModule, IconsProviderModule, NgZorroAntdModule, FormsModule, HttpClientModule, BrowserAnimationsModule, HighlightModule ], providers: [{ provide: NZ_I18N, useValue: zh_CN }], bootstrap: [AppComponent] }) export class AppModule { } `; ngOnInit() { } }