mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
23 lines
574 B
TypeScript
23 lines
574 B
TypeScript
import { EventData, Observable } from "tns-core-modules/data/observable";
|
|
import { Page } from "tns-core-modules/ui/page";
|
|
import * as frame from "tns-core-modules/ui/frame";
|
|
|
|
export function navigatingTo(args: EventData) {
|
|
const page = <Page>args.object;
|
|
page.bindingContext = new TestPage();
|
|
}
|
|
|
|
export function onNavBtnTap(args) {
|
|
frame.topmost().goBack();
|
|
}
|
|
|
|
export class TestPage extends Observable {
|
|
constructor() {
|
|
super();
|
|
}
|
|
|
|
// new line of span can be set with \n from code behind
|
|
get test(): string {
|
|
return "\ntest";
|
|
}
|
|
} |