-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathflexbox-main-page.ts
More file actions
24 lines (21 loc) · 1.06 KB
/
flexbox-main-page.ts
File metadata and controls
24 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { EventData } from '@nativescript/core/data/observable';
import { SubMainPageViewModel } from '../sub-main-page-view-model';
import { WrapLayout } from '@nativescript/core/ui/layouts/wrap-layout';
import { Page } from '@nativescript/core/ui/page';
export function pageLoaded(args: EventData) {
const page = <Page>args.object;
const wrapLayout = <WrapLayout>page.getViewById('wrapLayout');
page.bindingContext = new SubMainPageViewModel(wrapLayout, loadExamples());
}
export function loadExamples() {
const examples = new Map<string, string>();
examples.set('flexboxall', 'flexbox/flexbox-page');
examples.set('flexboxcss', 'flexbox/flexbox-css-page');
examples.set('flexboxdemo', 'flexbox/flexbox-demo-page');
examples.set('flexrepeat', 'flexbox/flexbox-repeater-page');
examples.set('flex-perf', 'flexbox/flexbox-perf-comparison-page');
examples.set('flexbox-4143', 'flexbox/flexbox-4143-page');
examples.set('flexbox-4834', 'flexbox/flexbox-4834-page');
examples.set('flexbox-ispassthroughparent', 'flexbox/flexbox-ispassthroughparent-page');
return examples;
}