Files
NativeScript/apps/app/ui-tests-app/font/main-page.ts
SvetoslavTsenov 97b1cd9060 Tsenov/searchbar (#4328)
* Searchbar tests

* Update search bar test page

* Fix path to events test pages

* Update text-view test pages
2017-06-07 10:25:16 +03:00

24 lines
1003 B
TypeScript

import { EventData } from "tns-core-modules/data/observable";
import { SubMainPageViewModel } from "../sub-main-page-view-model";
import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout";
import { Page } from "tns-core-modules/ui/page";
export function pageLoaded(args: EventData) {
const page = <Page>args.object;
const wrapLayout = <WrapLayout>page.getViewById("wrapLayoutWithExamples");
page.bindingContext = new SubMainPageViewModel(wrapLayout, loadExamples());
}
export function loadExamples() {
const examples = new Map<string, string>();
examples.set("fontbtn", "font/button");
examples.set("fontlbl", "font/label");
examples.set("fontfield", "font/text-field");
examples.set("fontview", "font/text-view");
examples.set("nordic", "/font/nordic/nordic");
examples.set("customfonts", "font/custom-fonts");
examples.set("all-fonts", "font/all-fonts");
examples.set("awesome-3654", "font/font-awesome/issue-3654");
return examples;
}