Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmartin committed Nov 26, 2018
1 parent aca4fc9 commit 56123dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions demo/app/app.ts
Original file line number Diff line number Diff line change
@@ -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' });
26 changes: 13 additions & 13 deletions demo/app/main-page.ts
Original file line number Diff line number Diff line change
@@ -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 = <pages.Page>args.object;
page.bindingContext = new HelloWorldModel(page);
// Get the event sender
let page = <pages.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);
}
}
try {
const flashMode = args.object.getFlashMode();
console.log(`flashMode in loaded event = ${flashMode}`);
} catch (e) {
console.log(e);
}
}

0 comments on commit 56123dc

Please sign in to comment.