mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
17 lines
579 B
TypeScript
17 lines
579 B
TypeScript
import { RadSideDrawer } from "nativescript-ui-sidedrawer";
|
|
import * as app from "tns-core-modules/application";
|
|
import { EventData } from "tns-core-modules/data/observable";
|
|
import { NavigatedData, Page } from "tns-core-modules/ui/page";
|
|
|
|
import { SearchViewModel } from "./search-view-model";
|
|
|
|
export function onNavigatingTo(args: NavigatedData) {
|
|
const page = <Page>args.object;
|
|
page.bindingContext = new SearchViewModel();
|
|
}
|
|
|
|
export function onDrawerButtonTap(args: EventData) {
|
|
const sideDrawer = <RadSideDrawer>app.getRootView();
|
|
sideDrawer.showDrawer();
|
|
}
|