mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
Merge remote-tracking branch 'origin/master'
Conflicts: demos/component-docs/menus/menus.html
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView, ActionSheet} from 'ionic/ionic';
|
import {IonicPlatform, Page, ActionSheet} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'actionSheet/actionSheet.html',
|
templateUrl: 'actionSheet/actionSheet.html',
|
||||||
})
|
})
|
||||||
export class ActionSheetPage {
|
export class ActionSheetPage {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {IonicPlatform, Page} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/buttons.html',
|
templateUrl: 'buttons/buttons.html',
|
||||||
})
|
})
|
||||||
export class ButtonsPage {
|
export class ButtonsPage {
|
||||||
@ -9,7 +9,7 @@ export class ButtonsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/block.html',
|
templateUrl: 'buttons/block.html',
|
||||||
})
|
})
|
||||||
export class BlockButtonsPage {
|
export class BlockButtonsPage {
|
||||||
@ -18,7 +18,7 @@ export class BlockButtonsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/full.html',
|
templateUrl: 'buttons/full.html',
|
||||||
})
|
})
|
||||||
export class FullButtonsPage {
|
export class FullButtonsPage {
|
||||||
@ -27,7 +27,7 @@ export class FullButtonsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/outline.html',
|
templateUrl: 'buttons/outline.html',
|
||||||
})
|
})
|
||||||
export class OutlineButtonsPage {
|
export class OutlineButtonsPage {
|
||||||
@ -36,7 +36,7 @@ export class OutlineButtonsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/round.html',
|
templateUrl: 'buttons/round.html',
|
||||||
})
|
})
|
||||||
export class RoundButtonsPage {
|
export class RoundButtonsPage {
|
||||||
@ -45,7 +45,7 @@ export class RoundButtonsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/fab.html',
|
templateUrl: 'buttons/fab.html',
|
||||||
})
|
})
|
||||||
export class FabPage {
|
export class FabPage {
|
||||||
@ -54,7 +54,7 @@ export class FabPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/sizes.html',
|
templateUrl: 'buttons/sizes.html',
|
||||||
})
|
})
|
||||||
export class ButtonSizesPage {
|
export class ButtonSizesPage {
|
||||||
@ -63,7 +63,7 @@ export class ButtonSizesPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'buttons/icons.html',
|
templateUrl: 'buttons/icons.html',
|
||||||
})
|
})
|
||||||
export class IconButtonsPage {
|
export class IconButtonsPage {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {IonicPlatform, Page} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'cards/cards.html',
|
templateUrl: 'cards/cards.html',
|
||||||
})
|
})
|
||||||
export class CardsPage {
|
export class CardsPage {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
|
||||||
import {IonicView} from 'ionic/ionic';
|
import {Page} from 'ionic/ionic';
|
||||||
|
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'forms/forms.html',
|
templateUrl: 'forms/forms.html',
|
||||||
bindings: [FormBuilder]
|
bindings: [FormBuilder]
|
||||||
})
|
})
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {IonicPlatform, Page} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'icons/icons.html',
|
templateUrl: 'icons/icons.html',
|
||||||
})
|
})
|
||||||
export class IconsPage {
|
export class IconsPage {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {App, IonicApp, IonicPlatform, ActionSheet} from 'ionic/ionic';
|
import {App, IonicApp, IonicPlatform, ActionSheet} from 'ionic/ionic';
|
||||||
import {IonicView, IonicConfig, Events} from 'ionic/ionic';
|
import {Page, IonicConfig, Events} from 'ionic/ionic';
|
||||||
import {ActionSheetPage} from 'actionSheet/actionSheet';
|
import {ActionSheetPage} from 'actionSheet/actionSheet';
|
||||||
import * as helpers from 'helpers';
|
import * as helpers from 'helpers';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {IonicPlatform, Page} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'lists/lists.html',
|
templateUrl: 'lists/lists.html',
|
||||||
})
|
})
|
||||||
export class ListsPage {
|
export class ListsPage {
|
||||||
|
15
demos/component-docs/menus/menu-events.html
Normal file
15
demos/component-docs/menus/menu-events.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<ion-navbar *navbar>
|
||||||
|
|
||||||
|
<a menu-toggle>
|
||||||
|
<icon menu></icon>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ion-title>
|
||||||
|
Events
|
||||||
|
</ion-title>
|
||||||
|
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content #content padding>
|
||||||
|
</ion-content>
|
15
demos/component-docs/menus/menu-friends.html
Normal file
15
demos/component-docs/menus/menu-friends.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<ion-navbar *navbar>
|
||||||
|
|
||||||
|
<a menu-toggle>
|
||||||
|
<icon menu></icon>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ion-title>
|
||||||
|
Friends
|
||||||
|
</ion-title>
|
||||||
|
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content #content padding>
|
||||||
|
</ion-content>
|
16
demos/component-docs/menus/menu-home.html
Normal file
16
demos/component-docs/menus/menu-home.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<ion-navbar *navbar>
|
||||||
|
|
||||||
|
<a menu-toggle>
|
||||||
|
<icon menu></icon>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ion-title>
|
||||||
|
Menus
|
||||||
|
</ion-title>
|
||||||
|
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-content #content padding>
|
||||||
|
<button block menu-toggle>Toggle Menu</button>
|
||||||
|
</ion-content>
|
0
demos/component-docs/menus/menu-places.html
Normal file
0
demos/component-docs/menus/menu-places.html
Normal file
@ -1,8 +1,24 @@
|
|||||||
|
<ion-menu #menu [content]="content">
|
||||||
|
|
||||||
<ion-navbar *navbar class="show-navbar">
|
<ion-toolbar primary>
|
||||||
<ion-title>Menus</ion-title>
|
<ion-title>Menu</ion-title>
|
||||||
</ion-navbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-content padding class="has-header">
|
<ion-content>
|
||||||
TODO
|
|
||||||
</ion-content>
|
<ion-list>
|
||||||
|
|
||||||
|
<button ion-item *ng-for="#p of pages" (click)="openPage(menu, p)">
|
||||||
|
{{p.title}}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button ion-item menu-toggle>
|
||||||
|
Close Menu
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
</ion-menu>
|
||||||
|
|
||||||
|
<ion-nav id="menuNav" #content [root]="rootView"></ion-nav>
|
||||||
|
@ -1,10 +1,58 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {App, IonicApp, Page, NavController, NavParams} from 'ionic/ionic';
|
||||||
|
import {Page, Events} from 'ionic/ionic';
|
||||||
|
import * as helpers from 'helpers';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'menus/menus.html',
|
templateUrl: 'menus/menu-home.html'
|
||||||
})
|
})
|
||||||
export class MenusPage {
|
class PageOne{
|
||||||
constructor() {
|
constructor(nav: NavController, events: Events) {
|
||||||
|
this.nav = nav;
|
||||||
|
this.events = events;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'menus/menu-friends.html'
|
||||||
|
})
|
||||||
|
class PageTwo{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'menus/menu-events.html'
|
||||||
|
})
|
||||||
|
class PageThree{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Page({
|
||||||
|
templateUrl: 'menus/menus.html'
|
||||||
|
})
|
||||||
|
export class MenusPage {
|
||||||
|
|
||||||
|
constructor(app: IonicApp, events: Events, nav: NavController) {
|
||||||
|
this.nav = nav;
|
||||||
|
this.app = app;
|
||||||
|
this.rootView = PageOne;
|
||||||
|
this.pages = [
|
||||||
|
{ title: 'Home', component: PageOne },
|
||||||
|
{ title: 'Friends', component: PageTwo },
|
||||||
|
{ title: 'Events', component: PageThree }
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onViewWillUnload() {
|
||||||
|
}
|
||||||
|
|
||||||
|
openPage(menu, page) {
|
||||||
|
// close the menu when clicking a link from the menu
|
||||||
|
menu.close();
|
||||||
|
|
||||||
|
// Reset the content nav to have just this page
|
||||||
|
// we wouldn't want the back button to show in this scenario
|
||||||
|
// let nav = this.app.getComponent('nav');
|
||||||
|
this.nav.setRoot(page.component);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {App, IonicApp, Animation, Modal, NavController, IonicView, Events} from 'ionic/ionic';
|
import {App, IonicApp, Animation, Modal, NavController, Page, Events} from 'ionic/ionic';
|
||||||
import * as helpers from 'helpers';
|
import * as helpers from 'helpers';
|
||||||
|
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'modals/modals.html'
|
templateUrl: 'modals/modals.html'
|
||||||
})
|
})
|
||||||
class ModalsFirstPage {
|
class ModalsFirstPage {
|
||||||
@ -26,7 +26,7 @@ class ModalsFirstPage {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'modals/modals-content.html'
|
templateUrl: 'modals/modals-content.html'
|
||||||
})
|
})
|
||||||
class ModalsContentPage {
|
class ModalsContentPage {
|
||||||
@ -46,7 +46,7 @@ class ModalsContentPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
template: '<ion-nav [root]="rootView"></ion-nav>'
|
template: '<ion-nav [root]="rootView"></ion-nav>'
|
||||||
})
|
})
|
||||||
export class ModalsPage {
|
export class ModalsPage {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {NavController, NavParams} from 'ionic/ionic';
|
import {NavController, NavParams} from 'ionic/ionic';
|
||||||
import {IonicView, Events} from 'ionic/ionic';
|
import {Page, Events} from 'ionic/ionic';
|
||||||
import * as helpers from 'helpers';
|
import * as helpers from 'helpers';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'navigation/navigation-details.html'
|
templateUrl: 'navigation/navigation-details.html'
|
||||||
})
|
})
|
||||||
class NavigationDetailsPage {
|
class NavigationDetailsPage {
|
||||||
@ -26,7 +26,7 @@ class NavigationDetailsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'navigation/navigation.html',
|
templateUrl: 'navigation/navigation.html',
|
||||||
})
|
})
|
||||||
export class NavigationPage {
|
export class NavigationPage {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView, Popup} from 'ionic/ionic';
|
import {IonicPlatform, Page, Popup} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'popups/popups.html',
|
templateUrl: 'popups/popups.html',
|
||||||
})
|
})
|
||||||
export class PopupsPage {
|
export class PopupsPage {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {IonicPlatform, IonicView} from 'ionic/ionic';
|
import {IonicPlatform, Page} from 'ionic/ionic';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'slides/slides.html',
|
templateUrl: 'slides/slides.html',
|
||||||
})
|
})
|
||||||
export class SlidesPage {
|
export class SlidesPage {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {NavController, NavParams} from 'ionic/ionic';
|
import {NavController, NavParams} from 'ionic/ionic';
|
||||||
import {IonicView, ViewController} from 'ionic/ionic';
|
import {Page, ViewController} from 'ionic/ionic';
|
||||||
import * as helpers from 'helpers';
|
import * as helpers from 'helpers';
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
template: 'Hello 1',
|
template: 'Hello 1',
|
||||||
})
|
})
|
||||||
class TabOneCtrl {
|
class TabOneCtrl {
|
||||||
@ -12,7 +12,7 @@ class TabOneCtrl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IonicView({
|
@Page({
|
||||||
templateUrl: 'tabs.html'
|
templateUrl: 'tabs.html'
|
||||||
})
|
})
|
||||||
export class TabsPage {
|
export class TabsPage {
|
||||||
|
Reference in New Issue
Block a user