mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
hostProperties for ion-content
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user