mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
17 lines
478 B
TypeScript
17 lines
478 B
TypeScript
import { EventData, Page } from "tns-core-modules/ui/page";
|
|
import { Frame } from "tns-core-modules/ui/frame";
|
|
import { Button } from "tns-core-modules/ui/button";
|
|
|
|
let currentFrame: Frame;
|
|
|
|
export function pageLoaded(args: EventData) {
|
|
currentFrame = (<Page>args.object).frame;
|
|
}
|
|
|
|
export function onButtonTap(args: EventData) {
|
|
const clickedButton = <Button>args.object;
|
|
|
|
const destination = clickedButton.text + "/page";
|
|
currentFrame.navigate(destination);
|
|
}
|