hostProperties for ion-content

This commit is contained in:
Adam Bradley
2015-05-06 09:55:29 -05:00
parent bd4ab6b2f2
commit 44c7ea6e27
4 changed files with 12 additions and 12 deletions

View File

@ -5,7 +5,10 @@ import {
} from 'angular2/angular2'; } from 'angular2/angular2';
@Component({ @Component({
selector: 'ion-content' selector: 'ion-content',
hostProperties: {
contentClass: 'class.content'
}
}) })
@View({ @View({
template: ` template: `
@ -14,10 +17,7 @@ import {
</div>` </div>`
}) })
export class Content { export class Content {
constructor( constructor() {
@NgElement() element:NgElement this.contentClass = true;
) {
this.domElement = element.domElement;
this.domElement.classList.add('content');
} }
} }

View File

@ -1,12 +1,12 @@
import {Component, View, Parent} from 'angular2/angular2' import {Component, View, Parent} from 'angular2/angular2'
import {NavController, Toolbar} from 'ionic/ionic' import {NavController, Toolbar, Content} from 'ionic/ionic'
import {SecondPage} from 'pages/second-page' import {SecondPage} from 'pages/second-page'
@Component() @Component()
@View({ @View({
templateUrl: 'pages/first-page.html', templateUrl: 'pages/first-page.html',
directives: [Toolbar] directives: [Toolbar, Content]
}) })
export class FirstPage { export class FirstPage {
constructor( constructor(

View File

@ -1,12 +1,12 @@
import {Component, View, Parent} from 'angular2/angular2' import {Component, View, Parent} from 'angular2/angular2'
import {NavController, Toolbar} from 'ionic/components' import {NavController, Toolbar, Content} from 'ionic/ionic'
import {ThirdPage} from 'pages/third-page' import {ThirdPage} from 'pages/third-page'
@Component() @Component()
@View({ @View({
templateUrl: 'pages/second-page.html', templateUrl: 'pages/second-page.html',
directives: [Toolbar] directives: [Toolbar, Content]
}) })
export class SecondPage { export class SecondPage {
constructor( constructor(

View File

@ -1,11 +1,11 @@
import {Component, View, Parent} from 'angular2/angular2' import {Component, View, Parent} from 'angular2/angular2'
import {NavController, Toolbar} from 'ionic/components' import {NavController, Toolbar, Content} from 'ionic/ionic'
@Component() @Component()
@View({ @View({
templateUrl: 'pages/third-page.html', templateUrl: 'pages/third-page.html',
directives: [Toolbar] directives: [Toolbar, Content]
}) })
export class ThirdPage { export class ThirdPage {
constructor( constructor(