diff --git a/demos/component-docs/actionSheet/actionSheet.ts b/demos/component-docs/actionSheet/actionSheet.ts index 4773e34ced..3027736e4b 100644 --- a/demos/component-docs/actionSheet/actionSheet.ts +++ b/demos/component-docs/actionSheet/actionSheet.ts @@ -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 { diff --git a/demos/component-docs/app.css b/demos/component-docs/app.css index c67cab1bf1..02aae65a61 100644 --- a/demos/component-docs/app.css +++ b/demos/component-docs/app.css @@ -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; diff --git a/demos/component-docs/buttons/buttons.ts b/demos/component-docs/buttons/buttons.ts index 3adc46eab3..d10bea7ecb 100644 --- a/demos/component-docs/buttons/buttons.ts +++ b/demos/component-docs/buttons/buttons.ts @@ -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() { diff --git a/demos/component-docs/cards/cards-image.html b/demos/component-docs/cards/cards-image.html index af281c55a3..1acdace8df 100644 --- a/demos/component-docs/cards/cards-image.html +++ b/demos/component-docs/cards/cards-image.html @@ -7,9 +7,7 @@ -
- -
+

diff --git a/demos/component-docs/cards/cards.ts b/demos/component-docs/cards/cards.ts index 8ec1919779..0cdecd43b8 100644 --- a/demos/component-docs/cards/cards.ts +++ b/demos/component-docs/cards/cards.ts @@ -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() { diff --git a/demos/component-docs/forms/forms.ts b/demos/component-docs/forms/forms.ts index f380b609bf..7df7efcd3a 100644 --- a/demos/component-docs/forms/forms.ts +++ b/demos/component-docs/forms/forms.ts @@ -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() { diff --git a/demos/component-docs/helpers.ts b/demos/component-docs/helpers.ts index b3f6795b9a..70f6dceaf1 100644 --- a/demos/component-docs/helpers.ts +++ b/demos/component-docs/helpers.ts @@ -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); } diff --git a/demos/component-docs/icons/icons.ts b/demos/component-docs/icons/icons.ts index 30ec93603b..f7cc33ee76 100644 --- a/demos/component-docs/icons/icons.ts +++ b/demos/component-docs/icons/icons.ts @@ -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() { diff --git a/demos/component-docs/index.ts b/demos/component-docs/index.ts index 921b315f55..ae087060be 100644 --- a/demos/component-docs/index.ts +++ b/demos/component-docs/index.ts @@ -36,4 +36,5 @@ class DemoApp { }); } + } diff --git a/demos/component-docs/lists/lists.ts b/demos/component-docs/lists/lists.ts index 66833e57bc..3905191a01 100644 --- a/demos/component-docs/lists/lists.ts +++ b/demos/component-docs/lists/lists.ts @@ -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() { diff --git a/demos/component-docs/menus/menus.ts b/demos/component-docs/menus/menus.ts index 61d179fc9b..2ebcd30fb2 100644 --- a/demos/component-docs/menus/menus.ts +++ b/demos/component-docs/menus/menus.ts @@ -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 { diff --git a/demos/component-docs/modals/modals.ts b/demos/component-docs/modals/modals.ts index f4c3936b3a..cc3e7a3306 100644 --- a/demos/component-docs/modals/modals.ts +++ b/demos/component-docs/modals/modals.ts @@ -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 { diff --git a/demos/component-docs/navigation/navigation.ts b/demos/component-docs/navigation/navigation.ts index 9e673ad9c3..98d937eebc 100644 --- a/demos/component-docs/navigation/navigation.ts +++ b/demos/component-docs/navigation/navigation.ts @@ -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 { diff --git a/demos/component-docs/popups/popups.ts b/demos/component-docs/popups/popups.ts index 603be55699..e59e8a807d 100644 --- a/demos/component-docs/popups/popups.ts +++ b/demos/component-docs/popups/popups.ts @@ -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 { diff --git a/demos/component-docs/slides/slides.ts b/demos/component-docs/slides/slides.ts index 4bb02ee779..8d83c79553 100644 --- a/demos/component-docs/slides/slides.ts +++ b/demos/component-docs/slides/slides.ts @@ -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() { diff --git a/demos/component-docs/tabs/tabs.ts b/demos/component-docs/tabs/tabs.ts index f395a1b15c..a57c1f3d76 100644 --- a/demos/component-docs/tabs/tabs.ts +++ b/demos/component-docs/tabs/tabs.ts @@ -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) {