-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aca4fc9
commit 56123dc
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |