1+ import { EventData } from "tns-core-modules/data/observable" ;
2+ import { SubMainPageViewModel } from "../sub-main-page-view-model" ;
3+ import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout" ;
4+ import { Page } from "tns-core-modules/ui/page" ;
5+
6+ export function pageLoaded ( args : EventData ) {
7+ const page = < Page > args . object ;
8+ const wrapLayout = < WrapLayout > page . getViewById ( "wrapLayoutWithExamples" ) ;
9+ page . bindingContext = new SubMainPageViewModel ( wrapLayout , loadExamples ( ) ) ;
10+ }
11+
12+ export function loadExamples ( ) {
13+ const examples = new Map < string , string > ( ) ;
14+ examples . set ( "full-screen-n-n" , "nested-frames/full-screen-n-n" ) ;
15+ examples . set ( "full-screen-n-y" , "nested-frames/full-screen-n-y" ) ;
16+ examples . set ( "full-screen-y-n" , "nested-frames/full-screen-y-n" ) ;
17+ examples . set ( "full-screen-y-y" , "nested-frames/full-screen-y-y" ) ;
18+ examples . set ( "mid-screen-n-n" , "nested-frames/mid-screen-n-n" ) ;
19+ examples . set ( "mid-screen-n-y" , "nested-frames/mid-screen-n-y" ) ;
20+ examples . set ( "mid-screen-y-n" , "nested-frames/mid-screen-y-n" ) ;
21+ examples . set ( "mid-screen-y-y" , "nested-frames/mid-screen-y-y" ) ;
22+ examples . set ( "tab-y-y" , "nested-frames/tab-y-y" ) ;
23+ examples . set ( "tab-n-y" , "nested-frames/tab-n-y" ) ;
24+ examples . set ( "tab-y-n" , "nested-frames/tab-y-n" ) ;
25+ examples . set ( "tab-n-n" , "nested-frames/tab-n-n" ) ;
26+
27+ return examples ;
28+ }
0 commit comments