From 56123dcc89b37e400331f85ddd91cfd9f51b865a Mon Sep 17 00:00:00 2001 From: Brad Martin Date: Mon, 26 Nov 2018 11:51:13 -0600 Subject: [PATCH] fix imports --- demo/app/app.ts | 4 ++-- demo/app/main-page.ts | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/demo/app/app.ts b/demo/app/app.ts index 98f8260..1d946a5 100644 --- a/demo/app/app.ts +++ b/demo/app/app.ts @@ -1,2 +1,2 @@ -import * as application from 'application'; -application.start({ moduleName: "main-page" }); +import * as application from 'tns-core-modules/application'; +application.start({ moduleName: 'main-page' }); diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts index 4725e36..74d3cd0 100644 --- a/demo/app/main-page.ts +++ b/demo/app/main-page.ts @@ -1,21 +1,21 @@ -import * as observable from 'data/observable'; -import * as pages from 'ui/page'; +import * as observable from 'tns-core-modules/data/observable'; +import * as pages from 'tns-core-modules/ui/page'; import { HelloWorldModel } from './main-view-model'; // Event handler for Page 'loaded' event attached in main-page.xml export function pageLoaded(args: observable.EventData) { - // Get the event sender - let page = args.object; - page.bindingContext = new HelloWorldModel(page); + // Get the event sender + let page = args.object; + page.bindingContext = new HelloWorldModel(page); } export function camLoaded(args: any) { - console.log(`cam loaded event`); + console.log(`cam loaded event`); - try { - const flashMode = args.object.getFlashMode(); - console.log(`flashMode in loaded event = ${flashMode}`); - } catch (e) { - console.log(e); - } -} \ No newline at end of file + try { + const flashMode = args.object.getFlashMode(); + console.log(`flashMode in loaded event = ${flashMode}`); + } catch (e) { + console.log(e); + } +}