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

View File

@ -1,12 +1,12 @@
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'
@Component()
@View({
templateUrl: 'pages/first-page.html',
directives: [Toolbar]
directives: [Toolbar, Content]
})
export class FirstPage {
constructor(

View File

@ -1,12 +1,12 @@
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'
@Component()
@View({
templateUrl: 'pages/second-page.html',
directives: [Toolbar]
directives: [Toolbar, Content]
})
export class SecondPage {
constructor(

View File

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