Angular8 在angular 8中使用ngx highlightJs时,数字列不显示

Angular8 在angular 8中使用ngx highlightJs时,数字列不显示,angular8,Angular8,给定的数据是一些主HTML页面和模块的提供者 <pre> <code [highlight]="previewText" [lineNumbers]="true"></code> </pre> providers: [ { provide: HIGHLIGHT_OPTIONS, useValue: <HighlightOptions>{ lineNumbers: true

给定的数据是一些主HTML页面和模块的提供者

<pre>
    <code [highlight]="previewText" [lineNumbers]="true"></code>
</pre>

providers: [
    {
      provide: HIGHLIGHT_OPTIONS,
      useValue: <HighlightOptions>{
        lineNumbers: true
      }
    }
  ]

供应商:[ { 提供:突出显示选项, 使用价值:{ 行号:对 } } ]
在app.module.ts文件中

import { Component } from '@angular/core';
import { HighlightResult } from 'ngx-highlightjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
 // response: HighlightResult;

  code = `const index=0` 
}
app.component.html

import { Component } from '@angular/core';
import { HighlightResult } from 'ngx-highlightjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
 // response: HighlightResult;

  code = `const index=0` 
}
<pre><code [highlight]="code" [lineNumbers]="true" ></code></pre>