mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(demos): make each actionSheet section a module
This commit is contained in:
1
demos/component-docs/action-sheets/action-sheets.ts
Normal file
1
demos/component-docs/action-sheets/action-sheets.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './basic/pages';
|
@ -1,13 +1,13 @@
|
|||||||
import {Platform, Page, ActionSheet} from 'ionic/ionic';
|
import {Platform, Page, ActionSheet} from 'ionic/ionic';
|
||||||
import {forwardRef} from 'angular2/angular2';
|
import {forwardRef} from 'angular2/angular2';
|
||||||
import {AndroidAttribute} from '../helpers';
|
import {AndroidAttribute} from '../../helpers';
|
||||||
|
|
||||||
@Page({
|
@Page({
|
||||||
templateUrl: 'actionSheet/actionSheet.html',
|
templateUrl: 'action-sheets/basic/basic.html',
|
||||||
directives: [forwardRef(() => AndroidAttribute)]
|
directives: [forwardRef(() => AndroidAttribute)]
|
||||||
|
|
||||||
})
|
})
|
||||||
export class ActionSheetPage {
|
export class BasicPage {
|
||||||
|
|
||||||
constructor(actionSheet: ActionSheet, platform: Platform) {
|
constructor(actionSheet: ActionSheet, platform: Platform) {
|
||||||
this.actionSheet = actionSheet;
|
this.actionSheet = actionSheet;
|
@ -2,8 +2,7 @@ import {Directive, ElementRef, Renderer} from 'angular2/angular2';
|
|||||||
import {Platform, Navbar} from 'ionic/ionic';
|
import {Platform, Navbar} from 'ionic/ionic';
|
||||||
|
|
||||||
|
|
||||||
import {ActionSheetPage} from './actionSheet/actionSheet';
|
import * as actionSheets from './action-sheets/action-sheets';
|
||||||
|
|
||||||
import * as buttons from './buttons/buttons';
|
import * as buttons from './buttons/buttons';
|
||||||
import * as cards from './cards/cards';
|
import * as cards from './cards/cards';
|
||||||
|
|
||||||
@ -95,7 +94,7 @@ export function hasScrollbar() {
|
|||||||
|
|
||||||
export function getPageFor(hash) {
|
export function getPageFor(hash) {
|
||||||
return {
|
return {
|
||||||
'action-sheets': ActionSheetPage,
|
'action-sheets': actionSheets.BasicPage,
|
||||||
|
|
||||||
'buttons': buttons.BasicPage,
|
'buttons': buttons.BasicPage,
|
||||||
'block-buttons': buttons.BlockPage,
|
'block-buttons': buttons.BlockPage,
|
||||||
|
Reference in New Issue
Block a user