【发布时间】:2016-11-02 13:43:26
【问题描述】:
如何在角度 1 中实现元素指令之类的组件?
这是我的代码,但它不起作用:
import {Component} from "@angular/core";
@Component({
moduleId: "TestComponent",
selector: "TestComponent",
template: '<Label text="TEST COMPONENT" textWrap="true"></Label>'
})
export class TestComponentComponent {
constructor() { }
}
@Component({
selector: "my-app",
template: `
<StackLayout>
<Label text="TEST"></Label>
<TestComponent></TestComponent>
</StackLayout>
`
})
export class AppComponent {
constructor() { }
}
【问题讨论】:
标签: nativescript angular2-nativescript