How to use the nativescript-angular.NativeScriptRouterModule.forRoot function in nativescript-angular

To help you get started, we’ve selected a few nativescript-angular 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 NathanWalker / ShoutOutPlay / app / main.ts View on Github external
player: playerReducer,
      playlist: playlistReducer,
      progress: progressReducer,
      search: searchReducer,
      sharedlist: sharedlistReducer,
      shoutout: shoutoutReducer
    }),
    ShoutOutPlayModule,
    EffectsModule.run(FirebaseEffects),
    EffectsModule.run(PlayerEffects),
    EffectsModule.run(PlaylistEffects),
    EffectsModule.run(ProgressEffects),
    EffectsModule.run(SharedlistEffects),
    EffectsModule.run(ShoutoutEffects),
    ComponentsModule,
    NativeScriptRouterModule.forRoot(routes)
  ],
  declarations: [
    AppComponent,
    ENTRY_COMPONENTS
  ],
  bootstrap: [AppComponent]
})
export class NativeModule { }

platformNativeScriptDynamic().bootstrapModule(NativeModule);
github greenstevester / nativescript-sidedrawer-example / app / app.module.ts View on Github external
@NgModule({
    bootstrap: [
        AppComponent
    ],
    declarations: [
        APP_COMPONENTS,
        SIDEDRAWER_DIRECTIVES,
        AUX_COMPONENTS,
    ],
    imports: [
        NativeScriptModule,
        NativeScriptFormsModule,
        NativeScriptHttpModule,
        NativeScriptRouterModule,
        NativeScriptRouterModule.forRoot(APP_ROUTES)
    ],
    exports: [
        SIDEDRAWER_DIRECTIVES,
        AUX_COMPONENTS,
        NativeScriptModule,
        NativeScriptFormsModule,
        NativeScriptHttpModule,
        NativeScriptRouterModule,
    ],
    providers: [
        DrawerService,
    ]
})
class AppModule { }

platformNativeScriptDynamic().bootstrapModule(AppModule);
github NativeScript / nativescript-angular / ng-sample / app / app.ts View on Github external
function makeExampleModule(componentType) {
    let imports: any[] = [ExampleModule];
    if (componentType.routes) {
        imports.push(NativeScriptRouterModule.forRoot(componentType.routes))
    }
    let exports: any[] = [];
    if (componentType.exports) {
        exports = componentType.exports;
    }
    let entries = [];
    if (componentType.entries) {
        entries = componentType.entries;
    }
    entries.push(componentType);
    let providers = [];
    if (componentType.providers) {
        providers = componentType.providers;
    }
    @NgModule({
        bootstrap: [componentType],
github ntrp / nativescript-ng2-drawer-seed / app / app.module.ts View on Github external
HomePage,
        SettingsPage,
        TodoPage,
        DrawerComponent,
        TodoListComponent,
        CheckboxComponent,
        StatusPipe
    ],
    bootstrap: [
        AppComponent
    ],
    imports: [
        NativeScriptModule,
        NativeScriptFormsModule,
        NativeScriptRouterModule,
        NativeScriptRouterModule.forRoot(APP_ROUTES),
        TNSFontIconModule.forRoot({
            'fa': 'fonts/font-awesome.css'
        })
    ],
    providers: [
        TodosService
    ],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})
export class AppModule {
}