How to use the ngx-highlightjs.HighlightModule.forRoot function in ngx-highlightjs

To help you get started, we’ve selected a few ngx-highlightjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular-extensions / elements / projects / elements-demo / src / app / core / core.module.ts View on Github external
import { SharedModule } from '../shared/shared.module';

import { ToolbarComponent } from './layout/toolbar/toolbar.component';
import { NavigationComponent } from './layout/navigation/navigation.component';
import { FooterComponent } from './layout/footer/footer.component';

export function hljsLanguages() {
  return [{ name: 'typescript', func: typescript }];
}

@NgModule({
  declarations: [ToolbarComponent, NavigationComponent, FooterComponent],
  imports: [
    // vendor
    RouterModule,
    HighlightModule.forRoot({
      languages: hljsLanguages
    }),

    // local
    SharedModule
  ],
  exports: [ToolbarComponent, NavigationComponent, FooterComponent]
})
export class CoreModule {}
github Okty-io / okty / src / app / app.module.ts View on Github external
import { SharedModule } from './shared/shared.module';
import { NgcCookieConsentModule } from 'ngx-cookieconsent';
import { cookieConfig } from './core/configs/cookie-consent';

@NgModule({
    declarations: [
        AppComponent,
    ],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        HttpClientModule,
        AppRoutingModule,
        CoreModule,
        SharedModule,
        HighlightModule.forRoot({languages: () => [{name: 'yaml', func: yaml}]}),
        NgcCookieConsentModule.forRoot(cookieConfig)
    ],
    providers: [
        ApiService,
        TitleService
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}
github why520crazy / ngx-validator / packages / integration / src / app / app.module.ts View on Github external
AppComponent,
        CodeExampleComponent,
        AppTemplateDrivenUseCaseComponent,
        AppReactiveDrivenUseCaseComponent,
        CustomSelectComponent,
        AppAddressControlComponent
    ],
    imports: [
        BrowserModule,
        FormsModule,
        ReactiveFormsModule,
        NgxValidatorModule.forRoot({
            validateOn: 'submit',
            globalValidationMessages: GLOBAL_VALIDATION_MESSAGES
        }),
        HighlightModule.forRoot({
            languages: hljsLanguages
        }),
        RouterModule.forRoot(
            [
                {
                    path: '',
                    redirectTo: 'template',
                    pathMatch: 'full'
                },
                {
                    path: 'template',
                    component: AppTemplateDrivenUseCaseComponent
                },
                {
                    path: 'reactive',
                    component: AppReactiveDrivenUseCaseComponent
github beyerleinf / ngx-dnd / projects / demo / src / app / shared / shared.module.ts View on Github external
{
      name: 'typescript',
      func: typescript,
    },
    {
      name: 'xml',
      func: xml,
    },
  ];
}

@NgModule({
  imports: [
    CommonModule,
    RouterModule,
    HighlightModule.forRoot({
      languages: hljsLanguages,
    }),
    TabsModule.forRoot(),
  ],
  exports: [
    CommonModule,
    RouterModule,
    SideNavComponent,
    FormsModule,
    TabsModule,
    CodeComponent,
  ],
  declarations: [
    SideNavComponent,
    CodeComponent,
  ],
github TinkoffCreditSystems / ng-polymorpheus / projects / demo / src / app / app.browser.module.ts View on Github external
{name: 'less', func: less},
        {name: 'xml', func: xml},
    ];
}

@NgModule({
    bootstrap: [AppComponent],
    imports: [
        BrowserModule.withServerTransition({appId: 'demo'}),
        InputDemoModule,
        MenuDemoModule,
        ComboBoxDemoModule,
        TabsDemoModule,
        StarWarsModule,
        StarWarsDemoModule,
        HighlightModule.forRoot({
            languages: hljsLanguages,
        }),
    ],
    declarations: [AppComponent],
    providers: [
        {
            provide: LocationStrategy,
            useClass: PathLocationStrategy,
        },
        {
            provide: DomSanitizer,
            useClass: NgDompurifyDomSanitizer,
        },
    ],
})
export class AppBrowserModule {}
github michaeldoye / mat-progress-buttons / demo / src / app / home / home.module.ts View on Github external
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
import {MatButtonModule, MatTabsModule, MatToolbarModule, MatTooltipModule} from '@angular/material';

export function hljsLanguages() {
    return [
      {name: 'typescript', func: typescript},
    ];
  }
@NgModule({
  imports: [
    CommonModule,
    BrowserAnimationsModule,
    MatProgressButtonsModule.forRoot(),
    HighlightModule.forRoot({languages: hljsLanguages}),
    HomeRoutingModule,
    MatButtonModule,
    MatTabsModule,
    MatToolbarModule,
    MatTooltipModule
  ],
    declarations: [HomeComponent],
})
export class HomeModule { }
github angular-material-extensions / contacts / demo / src / app / shared / shared.module.ts View on Github external
MatTooltipModule,
  MatButtonModule
} from '@angular/material';
import {FlexLayoutModule} from '@angular/flex-layout';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HighlightModule} from 'ngx-highlightjs';
import {NgxMaterialPagesModule} from 'ngx-material-pages';
import {MatContactsModule} from '@angular-material-extensions/contacts';

@NgModule({
  imports: [
    RouterModule,
    NgbCollapseModule,
    MatContactsModule.forRoot(),
    NgxMaterialPagesModule.forRoot(),
    HighlightModule.forRoot(),
    FormsModule,
    ReactiveFormsModule,
    FlexLayoutModule,
    MatCardModule,
    MatInputModule,
    MatIconModule,
    MatDividerModule,
    MatProgressBarModule,
    MatSlideToggleModule,
    MatSnackBarModule,
    MatTooltipModule,
    MatButtonModule
  ],
  exports: [
    HeaderComponent,
    FooterComponent,
github auth0-samples / auth0-angular-samples / 01-Login / src / app / app.module.ts View on Github external
@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    ProfileComponent,
    NavBarComponent,
    FooterComponent,
    HeroComponent,
    HomeContentComponent,
    LoadingComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgbModule,
    HighlightModule.forRoot({
      languages: hljsLanguages
    }),
    FontAwesomeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
github SAP / fundamental-ngx / apps / docs / src / app / app.module.ts View on Github external
const routes: Routes = [
    { path: '', loadChildren: './documentation/documentation.module#DocumentationModule' },
    { path: '**', redirectTo: '/home' }
];

@NgModule({
    declarations: [AppComponent],
    imports: [
        BrowserAnimationsModule,
        RouterModule.forRoot(routes, {
            scrollPositionRestoration: 'enabled',
            anchorScrolling: 'enabled'
        }),
        HttpClientModule,
        MarkdownModule.forRoot({ loader: HttpClient }),
        HighlightModule.forRoot({ languages: hljsLanguages })
    ],
    bootstrap: [AppComponent],
    entryComponents: []
})
export class AppModule {}
github MurhafSousli / ngx-sharebuttons / projects / demo / src / app / app.module.ts View on Github external
{name: 'scss', func: scss},
    {name: 'xml', func: xml}
  ];
}

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    HttpClientModule,
    HttpClientJsonpModule,
    HighlightModule.forRoot({
      languages: hljsLanguages
    }),
    NgProgressModule,
    NgProgressHttpModule,
    NgProgressRouterModule,
    SharedModule
  ],
  providers: [
    DocsService,
    {
      provide: SHARE_BUTTONS_CONFIG,
      useValue: {
        twitterAccount: 'MurhafSousli',
        theme: 'material-dark',
        debug: true
      }

ngx-highlightjs

Instant code highlighting, auto-detect language, super easy to use.

MIT
Latest version published 7 months ago

Package Health Score

68 / 100
Full package analysis

Popular ngx-highlightjs functions