-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Migrate to standalone components, closes #260
- Loading branch information
1 parent
3a47071
commit cadcd11
Showing
16 changed files
with
118 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
13 changes: 7 additions & 6 deletions
13
projects/ngx-highlightjs-demo/src/app/code/code.component.ts
This file contains 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
22 changes: 20 additions & 2 deletions
22
projects/ngx-highlightjs-demo/src/app/gist/gist.component.ts
This file contains 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
16 changes: 6 additions & 10 deletions
16
projects/ngx-highlightjs-demo/src/app/header/header.component.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core'; | ||
import { Component, ChangeDetectionStrategy } from '@angular/core'; | ||
import { FlexModule } from '@angular/flex-layout/flex'; | ||
|
||
@Component({ | ||
selector: 'app-header', | ||
templateUrl: './header.component.html', | ||
styleUrls: ['./header.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
imports: [FlexModule] | ||
}) | ||
export class HeaderComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
export class HeaderComponent { | ||
} | ||
|
27 changes: 0 additions & 27 deletions
27
projects/ngx-highlightjs-demo/src/app/material/material.module.ts
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,52 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { enableProdMode, importProvidersFrom } from '@angular/core'; | ||
import { provideHttpClient } from '@angular/common/http'; | ||
import { provideAnimations } from '@angular/platform-browser/animations'; | ||
import { BrowserModule, bootstrapApplication } from '@angular/platform-browser'; | ||
import { GIST_OPTIONS } from 'ngx-highlightjs/plus'; | ||
import { HIGHLIGHT_OPTIONS } from 'ngx-highlightjs'; | ||
import { environment } from './environments/environment'; | ||
import { AppComponent } from './app/app.component'; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
function bootstrap() { | ||
platformBrowserDynamic().bootstrapModule(AppModule) | ||
.catch(err => console.error(err)); | ||
}; | ||
bootstrapApplication(AppComponent, { | ||
providers: [ | ||
importProvidersFrom(BrowserModule.withServerTransition({ appId: 'serverApp' })), | ||
provideHttpClient(), | ||
{ | ||
provide: HIGHLIGHT_OPTIONS, | ||
useValue: { | ||
// fullLibraryLoader: () => import('highlight.js'), | ||
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' | ||
} | ||
}, | ||
{ | ||
provide: GIST_OPTIONS, | ||
useValue: { | ||
// clientId: | ||
// clientSecret: | ||
} | ||
}, | ||
provideAnimations() | ||
] | ||
}) | ||
.catch(err => console.error(err)); | ||
}; | ||
|
||
|
||
if (document.readyState === 'complete') { | ||
bootstrap(); | ||
} else { | ||
document.addEventListener('DOMContentLoaded', bootstrap); | ||
} | ||
|
||
if (document.readyState === 'complete') { | ||
bootstrap(); | ||
} else { | ||
document.addEventListener('DOMContentLoaded', bootstrap); | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.