mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
22 lines
441 B
TypeScript
22 lines
441 B
TypeScript
import { EventData, Page, Observable, Frame } from '@nativescript/core';
|
|
|
|
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';
|
|
}
|
|
}
|