mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(): update docs
This commit is contained in:
@@ -85,8 +85,44 @@ export { ViewController } from './navigation/view-controller';
|
||||
ToastCmp
|
||||
]
|
||||
})
|
||||
export class IonicModule {
|
||||
|
||||
/**
|
||||
* @name IonicModule
|
||||
* @description
|
||||
* IonicModule is a NgModule that allows you to create an app by passing it a Root App Component to use as root
|
||||
* It provides all the needed components/directives for an app, such as Tabs, Menus, and NavController
|
||||
*
|
||||
* @usage
|
||||
* ```ts
|
||||
* import { NgModule } from '@angular/core';
|
||||
* import { IonicApp, IonicModule } from 'ionic-angular';
|
||||
* import { MyApp } from './app.component';
|
||||
* import { HomePage } from '../pages/home/home';
|
||||
* @NgModule({
|
||||
* declarations: [
|
||||
* MyApp,
|
||||
* HomePage
|
||||
* ],
|
||||
* imports: [
|
||||
* IonicModule.forRoot(MyApp)
|
||||
* ],
|
||||
* bootstrap: [IonicApp],
|
||||
* entryComponents: [
|
||||
* MyApp,
|
||||
* HomePage
|
||||
* ],
|
||||
* providers: []
|
||||
* })
|
||||
* export class AppModule {}
|
||||
* ```
|
||||
*/
|
||||
export class IonicModule {
|
||||
/**
|
||||
* Set the root app component for you IonicModule
|
||||
* @param {any} appRoot The root AppComponent for this app.
|
||||
* @param {any} config Config Options for the app. Accepts any config property.
|
||||
* @param {any} deepLinkConfig Any configuration needed for the Ionic Deeplinker.
|
||||
*/
|
||||
static forRoot(appRoot: any, config: any = null, deepLinkConfig: any = null): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: IonicModule,
|
||||
|
||||
@@ -46,6 +46,11 @@ import { ViewController } from './view-controller';
|
||||
* truth in navigation. This encourages flexible navigation design and happy apps all
|
||||
* over the world.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
*/
|
||||
export class DeepLinker {
|
||||
segments: NavSegment[] = [];
|
||||
history: string[] = [];
|
||||
|
||||
@@ -106,8 +106,14 @@ export interface DeepLinkMetadataFactory {
|
||||
new (obj: DeepLinkMetadataType): DeepLinkMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export var DeepLink: DeepLinkMetadataFactory;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export interface DeepLinkConfig {
|
||||
links: DeepLinkMetadata[];
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ import { DeepLinkConfig, NavLink, NavSegment } from './nav-util';
|
||||
import { isArray, isBlank, isPresent } from '../util/util';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class UrlSerializer {
|
||||
links: NavLink[];
|
||||
|
||||
@@ -306,6 +309,9 @@ function sortConfigLinks(a: NavLink, b: NavLink) {
|
||||
|
||||
const URL_REPLACE_REG = /\s+|\?|\!|\$|\,|\.|\+|\"|\'|\*|\^|\||\/|\\|\[|\]|#|%|`|>|<|;|:|@|&|=/g;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const DeepLinkConfigToken = new OpaqueToken('USERLINKS');
|
||||
|
||||
export function setupUrlSerializer(userDeepLinkConfig: any): UrlSerializer {
|
||||
|
||||
@@ -824,6 +824,9 @@ interface BackButtonAction {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export function setupPlatform(platformConfigs: {[key: string]: PlatformConfig}, queryParams: QueryParams, userAgent: string, navigatorPlatform: string, docDirection: string, docLanguage: string, zone: NgZone): Platform {
|
||||
const p = new Platform();
|
||||
p.setDefault('core');
|
||||
@@ -839,7 +842,19 @@ export function setupPlatform(platformConfigs: {[key: string]: PlatformConfig},
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const UserAgentToken = new OpaqueToken('USERAGENT');
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const NavigatorPlatformToken = new OpaqueToken('NAVPLT');
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const DocumentDirToken = new OpaqueToken('DOCDIR');
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const DocLangToken = new OpaqueToken('DOCLANG');
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { OpaqueToken } from '@angular/core';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export class QueryParams {
|
||||
data: {[key: string]: any} = {};
|
||||
|
||||
@@ -27,8 +29,14 @@ export class QueryParams {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export const UrlToken = new OpaqueToken('USERURL');
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export function setupQueryParams(url: string): QueryParams {
|
||||
return new QueryParams(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user