-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow embedding the scanner in a page #136
- Loading branch information
1 parent
43381e1
commit 23395be
Showing
6 changed files
with
184 additions
and
116 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 +1,14 @@ | ||
import * as observable from "tns-core-modules/data/observable"; | ||
import * as pages from "tns-core-modules/ui/page"; | ||
import { HelloWorldModel } from "./main-view-model"; | ||
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(); | ||
} | ||
// Get the event sender | ||
let page = <pages.Page>args.object; | ||
page.bindingContext = new HelloWorldModel(); | ||
} | ||
|
||
export function onScanResult(scanResult: any) { | ||
console.log(`onScanResult: ${scanResult.text} (${scanResult.format})`); | ||
} |
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
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
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