Files
NativeScript/e2e/animation/app/css-animations/page.ts
2018-06-19 18:58:11 +03:00

16 lines
498 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 = "./css-animations/" + clickedButton.text + "/page";
currentFrame.navigate(destination);
}