Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@NgModule({
bootstrap: [
LazyLoadMain
],
declarations: [
LazyLoadMain,
FirstComponent,
],
entryComponents: [
LazyLoadMain,
],
imports: [
NativeScriptModule,
NativeScriptFormsModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forRoot(lazyLoadRoutes),
],
exports: [
NativeScriptModule,
NativeScriptFormsModule,
NativeScriptRouterModule,
],
providers: [
rootViewProvider,
lazyLoadHooksLogProvider,
{ provide: NgModuleFactoryLoader, useClass: NSModuleFactoryLoader },
]
})
class LazyLoadModule { }
application.start({
create: (): Page => {
import { NgModule } from '@angular/core';
import { Routes } from '@angular/router';
import { NativeScriptRouterModule } from 'nativescript-angular/router';
import { CaptureComponent } from './capture/capture.component';
const routes: Routes = [
{ path: '', redirectTo: '/capture', pathMatch: 'full' },
{ path: 'capture', component: CaptureComponent }
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule {}
path: 'game-play',
loadChildren: './game-play/game-play.module#GamePlayModule',
canActivate: [AuthGuard],
resolve: { 'categories': CategoriesResolver, 'tags': TagsResolver }
},
{
path: 'my',
loadChildren: './user/user.module#UserModule',
canActivate: [AuthGuard],
resolve: { 'categories': CategoriesResolver, 'tags': TagsResolver }
},
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule { }
import { NgModule } from '@angular/core';
import { Routes } from '@angular/router';
import { NativeScriptRouterModule } from 'nativescript-angular/router';
import { ItemDetailComponent } from './item/item-detail.component';
import { ItemsComponent } from './item/items.component';
const routes: Routes = [
{ path: '', redirectTo: '/items', pathMatch: 'full' },
{ path: 'items', component: ItemsComponent },
{ path: 'item/:id', component: ItemDetailComponent }
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule {}
function makeExampleModule(componentType) {
let imports: any[] = [NativeScriptAnimationsModule, 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 = [{ provide: ErrorHandler, useClass: MyErrorHandler }];
if (componentType.providers) {
providers = [...providers, componentType.providers];
}
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
import { NativeScriptRouterModule } from "nativescript-angular/router";
const routes: Routes = [
{ path: "", redirectTo: "/home", pathMatch: "full" },
{ path: "home", loadChildren: "./home/home.module#HomeModule" }
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule { }
@NgModule({
declarations: [
AppComponent,
ChatComponent,
ChatBoxComponent,
LoginComponent
],
bootstrap: [AppComponent],
imports: [
NativeScriptModule,
NativeScriptFormsModule,
NativeScriptHttpModule,
NativeScriptRouterModule,
ReactiveFormsModule,
NativeScriptUIListViewModule,
NativeScriptRouterModule.forRoot(routes)
],
providers: [ UserChatService, CommonFunctionsService, SingletonService, SocketService, FormBuilder ],
schemas: [NO_ERRORS_SCHEMA],
})
export class AppModule {}
import { NgModule } from "@angular/core";
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { Routes } from "@angular/router";
import { ItemsComponent } from "./item/items.component";
import { ItemDetailComponent } from "./item/item-detail.component";
const routes: Routes = [
{ path: "", redirectTo: "/items", pathMatch: "full" },
{ path: "items", component: ItemsComponent },
{ path: "item/:id", component: ItemDetailComponent }
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule { }
const routes: Routes = [
{ path: "", pathMatch: "full", redirectTo: "list" },
{ path: "list", component: AnimationsListComponent },
{ path: "builder", component: AnimationBuilderComponent },
{ path: "external", component: ExternalAnimationComponent },
{ path: "fade-in-out", component: FadeInOutComponent },
{ path: "options", component: OptionsComponent },
{ path: "options-default", component: OptionsDefaultComponent },
{ path: "animate-child", component: AnimateChildComponent },
{ path: "selector", component: SelectorAllComponent },
{ path: "query-stagger", component: QueryStaggerComponent },
{ path: "hero", loadChildren: "./hero/hero.module#HeroModule" },
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule],
})
export class AppRoutingModule { }
export const routedComponents = [
AnimationsListComponent,
AnimationBuilderComponent,
ExternalAnimationComponent,
FadeInOutComponent,
OptionsComponent,
OptionsDefaultComponent,
AnimateChildComponent,
SelectorAllComponent,
QueryStaggerComponent,
];
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
import { NativeScriptRouterModule } from "nativescript-angular/router";
const routes: Routes = [
{ path: "", redirectTo: "/home", pathMatch: "full" },
{ path: "home", loadChildren: "~/app/home/home.module#HomeModule" }
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule { }