UNPKG

2.66 kBTypeScriptView Raw
1/**
2 * Import Angular
3 */
4import { ModuleWithProviders } from '@angular/core';
5import { HashLocationStrategy, PathLocationStrategy, PlatformLocation } from '@angular/common';
6/**
7 * Import Other
8 */
9import { DeepLinkConfig } from './navigation/nav-util';
10import { Config } from './config/config';
11/**
12 * @name IonicModule
13 * @description
14 * IonicModule is an [NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html) that bootstraps
15 * an Ionic App. By passing a root component, IonicModule will make sure that all of the components,
16 * directives, and providers from the framework are imported.
17 *
18 * Any configuration for the app can be passed as the second argument to `forRoot`. This can be any
19 * valid property from the [Config](/docs/api/config/Config/).
20 *
21 * @usage
22 * ```ts
23 * import { NgModule } from '@angular/core';
24 *
25 * import { IonicApp, IonicModule } from 'ionic-angular';
26 *
27 * import { MyApp } from './app.component';
28 * import { HomePage } from '../pages/home/home';
29 *
30 * @NgModule({
31 * declarations: [
32 * MyApp,
33 * HomePage
34 * ],
35 * imports: [
36 * BrowserModule,
37 * IonicModule.forRoot(MyApp, {
38 *
39 * })
40 * ],
41 * bootstrap: [IonicApp],
42 * entryComponents: [
43 * MyApp,
44 * HomePage
45 * ],
46 * providers: []
47 * })
48 * export class AppModule {}
49 * ```
50 */
51export declare class IonicModule {
52 /**
53 * Set the root app component for you IonicModule
54 * @param {any} appRoot The root AppComponent for this app.
55 * @param {any} config Config Options for the app. Accepts any config property.
56 * @param {any} deepLinkConfig Any configuration needed for the Ionic Deeplinker.
57 */
58 static forRoot(appRoot: any, config?: any, deepLinkConfig?: DeepLinkConfig): ModuleWithProviders;
59}
60/**
61 * @name IonicPageModule
62 * @description
63 * IonicPageModule is an [NgModule](https://angular.io/docs/ts/latest/guide/ngmodule.html) that
64 * bootstraps a child [IonicPage](../navigation/IonicPage/) in order to set up routing.
65 *
66 * @usage
67 * ```ts
68 * import { NgModule } from '@angular/core';
69 *
70 * import { IonicPageModule } from 'ionic-angular';
71 *
72 * import { HomePage } from './home';
73 *
74 * @NgModule({
75 * declarations: [
76 * HomePage
77 * ],
78 * imports: [
79 * IonicPageModule.forChild(HomePage)
80 * ],
81 * entryComponents: [
82 * HomePage
83 * ]
84 * })
85 * export class HomePageModule { }
86 * ```
87 */
88export declare class IonicPageModule {
89 static forChild(page: any): ModuleWithProviders;
90}
91/**
92 * @hidden
93 */
94export declare function provideLocationStrategy(platformLocationStrategy: PlatformLocation, baseHref: string, config: Config): HashLocationStrategy | PathLocationStrategy;