forked from angular/react-native-renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.ts
More file actions
35 lines (31 loc) · 1.76 KB
/
Copy pathmodule.ts
File metadata and controls
35 lines (31 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {NgModule, Provider} from '@angular/core';
import {CommonModule, LocationStrategy} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {ReactNativeiOSModule, ReactNativeRouterModule, ReactNativeHttpModule, ReactNativeLocationStrategy} from 'angular2-react-native';
import {KitchenSinkApp} from './kitchensink';
import {HelloApp} from "./hello";
import {TodoMVC, TodoItem} from './todomvc';
import {GesturesApp} from "././gestures";
import {WidgetsList} from "./widgets";
import {WebViewApp} from './webview';
import {APIsApp} from "./apis";
import {HttpApp} from "././http";
import {AnimationApp, Ball} from './animation';
const appRoutes: Routes = [
{ path: '', component: HelloApp, data: {title: 'Kitchen Sink', backButtonTitle: 'Home'}},
{ path: 'widgets', component: WidgetsList, data: {title: 'Components'}},
{ path: 'webview', component: WebViewApp, data: {title: 'WebView'}},
{ path: 'apis', component: APIsApp, data: {title: 'APIs'}},
{ path: 'todomvc', component: TodoMVC, data: {title: 'TodoMVC', rightButtonTitle: 'More'}},
{ path: 'gestures', component: GesturesApp, data: {title: 'Gestures'} },
{ path: 'http', component: HttpApp, data: {title: 'Http'} },
{ path: 'animation', component: AnimationApp, data: {title: 'Animation'} }
];
export const providers: Provider[] = RouterModule.forRoot(appRoutes)['providers'];
@NgModule({
declarations: [KitchenSinkApp, HelloApp, WidgetsList, APIsApp, AnimationApp, Ball, GesturesApp, HttpApp, TodoMVC, TodoItem, WebViewApp],
imports: [ReactNativeiOSModule, ReactNativeHttpModule, CommonModule, ReactNativeRouterModule],
providers: [providers, {provide: LocationStrategy, useClass: ReactNativeLocationStrategy}],
bootstrap: [KitchenSinkApp]
})
export class KitchenSinkModule {}