mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00

* chore(tslint): fix tslint config & errors * chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
24 lines
640 B
TypeScript
24 lines
640 B
TypeScript
import { Property } from "tns-core-modules/ui/core/properties"
|
|
import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base"
|
|
import { parse } from "tns-core-modules/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(parse(this.template));
|
|
}
|
|
}
|
|
|
|
export const templateProperty = new Property<TemplateView, string>({
|
|
name: "template",
|
|
affectsLayout: true
|
|
});
|
|
templateProperty.register(TemplateView);
|