mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
22 lines
490 B
TypeScript
22 lines
490 B
TypeScript
import { Property, LayoutBase, Builder } from '@nativescript/core';
|
|
|
|
export module knownTemplates {
|
|
export var template = 'template';
|
|
}
|
|
|
|
export class TemplateView extends LayoutBase {
|
|
public template: string;
|
|
|
|
public static testEvent: string = 'test';
|
|
|
|
public parseTemplate() {
|
|
this.addChild(Builder.parse(this.template));
|
|
}
|
|
}
|
|
|
|
export const templateProperty = new Property<TemplateView, string>({
|
|
name: 'template',
|
|
affectsLayout: true,
|
|
});
|
|
templateProperty.register(TemplateView);
|