Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function modalParamsFactory() {
return new ModalDialogParams({}, null);
}
const routes: Routes = [
{
path: "",
component: LazyComponent
}
];
@NgModule({
imports: [
NativeScriptCommonModule,
NativeScriptRouterModule.forChild(routes),
],
declarations: [
LazyComponent
],
entryComponents: [
LazyComponent
],
providers: [
// allows same component to be routed to
// or lazily loaded via modal
{ provide: ModalDialogParams, useFactory: modalParamsFactory }
],
schemas: [NO_ERRORS_SCHEMA]
})
export class LazyModule { }
children: [
{
path: "modal-view", component: ModalViewActionBarComponent
}
]
}
// << modal-view-routes-actionbar
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
ModalViewExamplesComponent,
SampleModalViewModuleExampleComponent,
ModalViewNavigationComponent,
ModalViewComponent,
HomeModalViewComponent,
HomeModalViewContentComponent,
SecondModalViewContentComponent,
MainViewComponent,
ModalRootComponent,
ModalViewActionBarComponent
],
entryComponents: [ModalViewComponent, HomeModalViewComponent, ModalRootComponent]
})
},
{
path: "value",
component: SliderAccessValueComponent,
data: { title: "Slider's value" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptFormsModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
SliderExamplesComponent,
BasicSliderComponent,
SliderAccessValueComponent
]
})
export class SliderExamplesModule {
constructor() { }
}
component: HtmlViewExamplesComponent
},
{
path: "usage",
component: HtmlViewUsageComponent,
data: { title: "Usage" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [HtmlViewExamplesComponent, HtmlViewUsageComponent]
})
export class HtmlViewExamplesModule {
constructor() { }
}
component: PlatformExamplesComponent
},
{
path: "usage",
component: PlatformModuleExampleComponent,
data: { title: "Usage" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
PlatformExamplesComponent,
PlatformModuleExampleComponent
]
})
export class PlatformExamplesModule {
constructor() { }
}
component: LabelExamplesComponent
},
{
path: "creating-label",
component: CreatingLabelComponent,
data: { title: "Create Label" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
LabelExamplesComponent,
CreatingLabelComponent
]
})
export class LabelExamplesModule {
constructor() { }
}
import { HomeComponent } from "./home.component";
import { CommonModule } from "@angular/common";
import { NativeScriptFacebookModule } from "nativescript-facebook/angular";
export const routerConfig = [
{
path: "",
component: HomeComponent
}
];
@NgModule({
imports: [
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig),
CommonModule
],
declarations: [ HomeComponent ],
schemas: [ NO_ERRORS_SCHEMA ]
})
export class HomeModule { }
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { SettingsComponent } from "./settings.component";
const routes: Routes = [
{ path: "", component: SettingsComponent }
];
@NgModule({
imports: [NativeScriptRouterModule.forChild(routes)],
exports: [NativeScriptRouterModule]
})
export class SettingsRoutingModule { }
data: { title: "Using async pipe" }
},
{
path: "update-child-component",
component: UpdateChildComponent,
data: { title: "Update child component" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
ItemComponent,
ListViewExamplesComponent,
CreatingListViewComponent,
CustomizingListViewComponent,
UsingAsyncPipeComponent,
UpdateChildComponent
]
})
export class ListViewExamplesModule {
constructor() { }
}
data: { title: "Clear SearchBar" }
},
{
path: "binding",
component: SearchBarBindingComponent,
data: { title: "SearchBar property binding" }
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
TitleAndNavButtonModule,
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [
SearchBarExamplesComponent,
BasicSearchBarComponent,
ClearSearchBarComponent,
SearchBarBindingComponent
]
})
export class SearchBarExamplesModule {
constructor() { }
}