|
|
|
@ -14,12 +14,14 @@ import { TreeModule } from '@circlon/angular-tree-component';
|
|
|
|
|
import {AgGridModule} from 'ag-grid-angular';
|
|
|
|
|
import {MonacoEditorModule} from 'ngx-monaco-editor';
|
|
|
|
|
import { APP_BASE_HREF, PlatformLocation } from '@angular/common';
|
|
|
|
|
import { MarkdownModule } from 'ngx-markdown';
|
|
|
|
|
import {MarkdownModule, MarkedOptions} from 'ngx-markdown';
|
|
|
|
|
import {ConnectionServiceModule} from 'ng-connection-service';
|
|
|
|
|
import { ServiceWorkerModule } from '@angular/service-worker';
|
|
|
|
|
import { environment } from '../environments/environment';
|
|
|
|
|
import { AngularResizedEventModule } from 'angular-resize-event';
|
|
|
|
|
import { IonicSelectableModule } from 'ionic-selectable';
|
|
|
|
|
import * as hljs from 'highlight.js';
|
|
|
|
|
import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This function is used internal to get a string instance of the `<base href="" />` value from `index.html`.
|
|
|
|
@ -48,7 +50,24 @@ export function getBaseHref(platformLocation: PlatformLocation): string {
|
|
|
|
|
TreeModule,
|
|
|
|
|
AgGridModule.withComponents([]),
|
|
|
|
|
MonacoEditorModule.forRoot(),
|
|
|
|
|
MarkdownModule.forRoot(),
|
|
|
|
|
HighlightModule,
|
|
|
|
|
MarkdownModule.forRoot({
|
|
|
|
|
markedOptions: {
|
|
|
|
|
provide: MarkedOptions,
|
|
|
|
|
useValue: {
|
|
|
|
|
highlight(code: string, lang: string, callback?: (error: any, code: string) => void): string {
|
|
|
|
|
const highlighted = hljs.highlight(lang, code, true);
|
|
|
|
|
console.log('highlighed', highlighted);
|
|
|
|
|
|
|
|
|
|
if ( callback ) {
|
|
|
|
|
callback(null, highlighted.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return highlighted.value;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
ConnectionServiceModule,
|
|
|
|
|
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
|
|
|
|
|
AngularResizedEventModule,
|
|
|
|
@ -62,7 +81,13 @@ export function getBaseHref(platformLocation: PlatformLocation): string {
|
|
|
|
|
provide: APP_BASE_HREF,
|
|
|
|
|
useFactory: getBaseHref,
|
|
|
|
|
deps: [PlatformLocation]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
provide: HIGHLIGHT_OPTIONS,
|
|
|
|
|
useValue: {
|
|
|
|
|
fullLibraryLoader: () => import('highlight.js'),
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
bootstrap: [AppComponent]
|
|
|
|
|
})
|
|
|
|
|