mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(demos): fix circular dependency
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import {Platform, Page, ActionSheet} from 'ionic/ionic';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'actionSheet/actionSheet.html',
|
||||
directives: [AndroidAttribute]
|
||||
})
|
||||
export class ActionSheetPage {
|
||||
|
||||
|
||||
@@ -198,12 +198,7 @@ ion-card.adv-map p {
|
||||
body.md {
|
||||
border-top: 24px solid black;
|
||||
}
|
||||
body.md .android-attr, body.md .android-attr div.toolbar-background {
|
||||
background-color: #4e8ef7;
|
||||
}
|
||||
body.md .android-attr .toolbar-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
body.md img#md-only {
|
||||
display: block !important;
|
||||
position: absolute;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/buttons.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class ButtonsPage {
|
||||
constructor() {
|
||||
@@ -11,6 +14,7 @@ export class ButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/block.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class BlockButtonsPage {
|
||||
constructor() {
|
||||
@@ -20,6 +24,7 @@ export class BlockButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/clear.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class ClearButtonsPage {
|
||||
constructor() {
|
||||
@@ -29,6 +34,7 @@ export class ClearButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/full.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class FullButtonsPage {
|
||||
constructor() {
|
||||
@@ -38,6 +44,7 @@ export class FullButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/outline.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class OutlineButtonsPage {
|
||||
constructor() {
|
||||
@@ -47,6 +54,7 @@ export class OutlineButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/round.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class RoundButtonsPage {
|
||||
constructor() {
|
||||
@@ -56,6 +64,7 @@ export class RoundButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/fab.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class FabPage {
|
||||
constructor() {
|
||||
@@ -65,6 +74,7 @@ export class FabPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/sizes.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class ButtonSizesPage {
|
||||
constructor() {
|
||||
@@ -74,6 +84,7 @@ export class ButtonSizesPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/icons.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class IconButtonsPage {
|
||||
constructor() {
|
||||
@@ -83,6 +94,7 @@ export class IconButtonsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'buttons/components.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class ButtonsInComponentsPage {
|
||||
constructor() {
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
<ion-card>
|
||||
|
||||
<div>
|
||||
<img src="img/nin-live.png"/>
|
||||
</div>
|
||||
<img src="img/nin-live.png"/>
|
||||
|
||||
<ion-card-content>
|
||||
<h2 class="card-title">
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-basic.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsBasicPage {
|
||||
constructor() {
|
||||
@@ -11,6 +14,7 @@ export class CardsBasicPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-header.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsHeaderPage {
|
||||
constructor() {
|
||||
@@ -21,6 +25,7 @@ export class CardsHeaderPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-list.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsListPage {
|
||||
constructor() {
|
||||
@@ -30,6 +35,7 @@ export class CardsListPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-image.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsImagePage {
|
||||
constructor() {
|
||||
@@ -39,6 +45,7 @@ export class CardsImagePage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-background.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsBackgroundPage {
|
||||
constructor() {
|
||||
@@ -48,6 +55,7 @@ export class CardsBackgroundPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-advanced-social.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsAdvancedSocialPage {
|
||||
constructor() {
|
||||
@@ -57,6 +65,7 @@ export class CardsAdvancedSocialPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-advanced-map.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsAdvancedMapPage {
|
||||
constructor() {
|
||||
@@ -66,6 +75,7 @@ export class CardsAdvancedMapPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'cards/cards-advanced-image.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class CardsAdvancedImagePage {
|
||||
constructor() {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
|
||||
import {FORM_DIRECTIVES, FormBuilder, forwardRef, Validators, Control, ControlGroup} from 'angular2/angular2';
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/forms.html',
|
||||
providers: [FormBuilder]
|
||||
providers: [FormBuilder],
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class FormsPage {
|
||||
|
||||
@@ -25,6 +28,7 @@ export class FormsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/fixed-inline.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class FixedInlinePage {
|
||||
constructor() {
|
||||
@@ -34,6 +38,7 @@ export class FixedInlinePage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/floating.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class FloatingPage {
|
||||
constructor() {
|
||||
@@ -44,6 +49,7 @@ export class FloatingPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/inline.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class InlinePage {
|
||||
constructor() {
|
||||
@@ -54,6 +60,7 @@ export class InlinePage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/inset.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class InsetPage {
|
||||
constructor() {
|
||||
@@ -64,6 +71,7 @@ export class InsetPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/placeholder.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class PlaceholderPage {
|
||||
constructor() {
|
||||
@@ -74,6 +82,7 @@ export class PlaceholderPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'forms/stacked.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class StackedPage {
|
||||
constructor() {
|
||||
|
||||
@@ -54,7 +54,6 @@ import {TabsPage} from './tabs/tabs';
|
||||
export class AndroidAttribute {
|
||||
|
||||
constructor (platform: Platform, elementRef: ElementRef, renderer: Renderer) {
|
||||
console.log('init');
|
||||
this.isAndroid = platform.is('android');
|
||||
renderer.setElementAttribute(elementRef, 'primary', this.isAndroid ? true : null);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'icons/icons.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class IconsPage {
|
||||
constructor() {
|
||||
|
||||
@@ -36,4 +36,5 @@ class DemoApp {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/basic-lists.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class BasicListsPage {
|
||||
constructor() {
|
||||
@@ -11,6 +15,7 @@ export class BasicListsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/dividers.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class BasicDividersPage {
|
||||
constructor() {
|
||||
@@ -20,6 +25,7 @@ export class BasicDividersPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/inset-lists.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class BasicInsetListsPage {
|
||||
constructor() {
|
||||
@@ -29,6 +35,7 @@ export class BasicInsetListsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/list-headers.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class ListHeadersPage {
|
||||
constructor() {
|
||||
@@ -38,6 +45,7 @@ export class ListHeadersPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/icon-lists.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class IconListsPage {
|
||||
constructor() {
|
||||
@@ -47,6 +55,7 @@ export class IconListsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'lists/avatar-lists.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class AvatarListsPage {
|
||||
constructor() {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import {App, IonicApp, Page} from 'ionic/ionic';
|
||||
import * as helpers from './helpers';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import * as helpers from '../helpers';
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'menus/menu-home.html'
|
||||
templateUrl: 'menus/menu-home.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class PageOne{
|
||||
constructor() {
|
||||
@@ -10,19 +13,22 @@ class PageOne{
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'menus/menu-friends.html'
|
||||
templateUrl: 'menus/menu-friends.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class PageTwo{
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'menus/menu-events.html'
|
||||
templateUrl: 'menus/menu-events.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class PageThree{
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'menus/menus.html'
|
||||
templateUrl: 'menus/menus.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
export class MenusPage {
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import {App, IonicApp, Animation, Modal, NavController, Page, Events} from 'ionic/ionic';
|
||||
import * as helpers from './helpers';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import * as helpers from '../helpers';
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'modals/modals.html'
|
||||
templateUrl: 'modals/modals.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class ModalsFirstPage {
|
||||
|
||||
@@ -23,7 +25,9 @@ class ModalsFirstPage {
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'modals/modals-content.html'
|
||||
templateUrl: 'modals/modals-content.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
|
||||
})
|
||||
class ModalsContentPage {
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import {NavController, NavParams} from 'ionic/ionic';
|
||||
import {Page, Events} from 'ionic/ionic';
|
||||
import * as helpers from './helpers';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import * as helpers from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'navigation/navigation-details.html'
|
||||
templateUrl: 'navigation/navigation-details.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class NavigationDetailsPage {
|
||||
constructor(nav: NavController, params: NavParams, events: Events) {
|
||||
@@ -28,6 +30,7 @@ class NavigationDetailsPage {
|
||||
|
||||
@Page({
|
||||
templateUrl: 'navigation/navigation.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
export class NavigationPage {
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import {Page, Popup} from 'ionic/ionic';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'popups/popups.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class PopupsPage {
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import {Page} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import {AndroidAttribute} from '../helpers';
|
||||
|
||||
@Page({
|
||||
templateUrl: 'slides/slides.html',
|
||||
directives: [forwardRef(() => AndroidAttribute)]
|
||||
})
|
||||
export class SlidesPage {
|
||||
constructor() {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import {NavController, NavParams} from 'ionic/ionic';
|
||||
import {Page, ViewController} from 'ionic/ionic';
|
||||
import * as helpers from './helpers';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import * as helpers from '../helpers';
|
||||
|
||||
@Page({
|
||||
template: 'Hello 1',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
class TabOneCtrl {
|
||||
constructor(nav: NavController, view: ViewController) {
|
||||
@@ -13,7 +15,8 @@ class TabOneCtrl {
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'tabs/tabs.html'
|
||||
templateUrl: 'tabs/tabs.html',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)]
|
||||
})
|
||||
export class TabsPage {
|
||||
constructor(nav: NavController, params: NavParams) {
|
||||
|
||||
Reference in New Issue
Block a user