Files
NativeScript/tests/app/xml-declaration/template-builder-tests/template-view.ts
2020-01-17 15:12:28 +02:00

24 lines
643 B
TypeScript

import { Property } from "@nativescript/core/ui/core/properties";
import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";
import { Builder } from "@nativescript/core/ui/builder";
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);