Created
February 23, 2018 23:21
-
-
Save captaincole/2e0ea14a48b145f9673551dc3402ad9c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // app.component.ts | |
| constructor() { | |
| const branchInit = () => { | |
| if (!platform.is('cordova')) { return } | |
| Branch.initSession( (data) => { | |
| console.log('Branch Initialized'); | |
| if (data.$deeplink_path) { | |
| this.logger.logEvent('deeplink', {}); | |
| console.log('Routing Link' + JSON.stringify(data.$deeplink_path)); | |
| this.routeLink(data.$deeplink_path); | |
| } | |
| }).then( () => { | |
| console.log('Branch Init'); | |
| }).catch( (err) => { | |
| console.log('Branch Init Error: ' + JSON.stringify(err)); | |
| }); | |
| } | |
| //.. | |
| routeLink(path) { | |
| // Do something with your path | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment