mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
remove source references to ionic2/components
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
import {Component, NgElement, Template} from 'angular2/angular2';
|
||||
|
||||
@Component({
|
||||
selector: '[red-bg]'
|
||||
})
|
||||
@Template({
|
||||
inline: 'red template'
|
||||
})
|
||||
export class RedBgStyler {
|
||||
constructor(
|
||||
element:NgElement
|
||||
) {
|
||||
element.domElement.style.background = 'red';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: '[blue-bg]'
|
||||
})
|
||||
@Template({
|
||||
inline: 'blue template'
|
||||
})
|
||||
export class BlueTextStyler {
|
||||
constructor(
|
||||
element:NgElement
|
||||
) {
|
||||
element.domElement.style.color = 'blue';
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import {Component, Template, bootstrap} from 'angular2/angular2';
|
||||
import {Tabs, Tab} from 'ionic2/components/tabs/tabs2';
|
||||
|
||||
/*
|
||||
@Route('tabs')
|
||||
*/
|
||||
@Component({
|
||||
selector: 'tabs-page'
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<ion-tabs>
|
||||
<ion-tab title="One">
|
||||
One content
|
||||
</ion-tab>
|
||||
<ion-tab title="Two">
|
||||
Two content
|
||||
</ion-tab>
|
||||
</ion-tabs>
|
||||
`,
|
||||
directives: [Tabs, Tab]
|
||||
})
|
||||
export class TabsPage {
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<my-app>
|
||||
Loading...
|
||||
</my-app>
|
||||
@@ -1,38 +0,0 @@
|
||||
import {DynamicComponent, Component, Template, bootstrap, NgElement} from 'angular2/angular2';
|
||||
import {Inject} from 'angular2/di';
|
||||
import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_component_loader';
|
||||
import {PrivateComponentLocation} from 'angular2/src/core/compiler/private_component_location';
|
||||
import {RedBgStyler, BlueTextStyler} from 'ionic2/components/stylers';
|
||||
|
||||
@DynamicComponent({
|
||||
selector: 'dynamic-component',
|
||||
services: [PrivateComponentLoader, PrivateComponentLocation]
|
||||
})
|
||||
class MyDynamic {
|
||||
|
||||
constructor(
|
||||
loader:PrivateComponentLoader,
|
||||
location:PrivateComponentLocation
|
||||
) {
|
||||
loader.load(RedBgStyler, location);
|
||||
loader.load(BlueTextStyler, location);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'my-app'
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<dynamic-component>Hello!</dynamic-component>
|
||||
`,
|
||||
directives: [MyDynamic],
|
||||
})
|
||||
class MyApp {
|
||||
constructor() {
|
||||
console.log('MyApp loaded');
|
||||
}
|
||||
}
|
||||
|
||||
bootstrap(MyApp);
|
||||
Reference in New Issue
Block a user