Last active
March 28, 2024 02:57
-
-
Save MurhafSousli/de9decbcd2539d5ba399aedc598bcaa6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { provideHighlightOptions } from 'ngx-highlightjs'; | |
export const appConfig: ApplicationConfig = { | |
providers: [ | |
provideHighlightOptions({ | |
lineNumbersLoader: () => import('ngx-highlightjs/line-numbers'), | |
coreLibraryLoader: () => import('highlight.js/lib/core'), | |
languages: { | |
typescript: () => import('highlight.js/lib/languages/typescript'), | |
css: () => import('highlight.js/lib/languages/css'), | |
xml: () => import('highlight.js/lib/languages/xml') | |
}, | |
themePath: 'assets/styles/androidstudio.css' | |
}) | |
] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { provideHighlightOptions } from 'ngx-highlightjs'; | |
export const appConfig: ApplicationConfig = { | |
providers: [ | |
provideHighlightOptions({ | |
fullLibraryLoader: () => import('highlight.js'), | |
lineNumbersLoader: () => import('ngx-highlightjs/line-numbers'), | |
themePath: 'assets/styles/androidstudio.css' | |
}) | |
] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HighlightAuto } from 'ngx-highlightjs'; | |
import { HighlightLineNumbers } from 'ngx-highlightjs/line-numbers'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<pre><code [highlightAuto]="code" lineNumbers></code></pre> | |
`, | |
standalone: true, | |
imports: [HighlightAuto, HighlightLineNumbers] | |
}) | |
export class AppComponent { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Highlight } from 'ngx-highlightjs'; | |
import { HighlightLineNumbers } from 'ngx-highlightjs/line-numbers'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<pre><code [highlight]="code" language="html" lineNumbers></code></pre> | |
`, | |
standalone: true, | |
imports: [Highlight, HighlightLineNumbers] | |
}) | |
export class AppComponent { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install ngx-highlightjs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment