angularjs - how to use cordova-universal-links-plugin in a ionic+cordova+angular app? -
i'm quite noob cordova , has easy solution, i've searched entire internet , failed find it. read plugin creation guide cordova no luck.
i have ionic/cordova app , installed plugin https://github.com/nordnet/cordova-universal-links-plugin command:
$ cordova plugin add cordova-universal-links-plugin --save
btw, using angular 1.6, , cordova 6.5.
now i've followed instructions on github page, when calling
universallinks.subscribe(...)
from
angular.module('mymodule', ['libs...']) .run(function($ionicplatform, $state, $cordovabadge) { $ionicplatform.ready(function() { /*here*/ universallinks.subscribe(...) /*here*/ ... }
i error:
uncaught referenceerror: universallinks not defined @ app.js:44 @ array.<anonymous> (ionic.bundle.js:56230) @ onplatformready (ionic.bundle.js:2496) @ onwindowload (ionic.bundle.js:2477)
i tried adding 'universallinks' or 'universal-links' array of dependencies of module, errors related (injector failed find it)
i looked plugin's directory , there's ./www/universallinks.js file there defined universallinks object, don't know that, can't include in index.html since it's outside app's www directory, , think cordova should integrate automatically anyway.
what doing wrong? how should use plugin?
there similar unanswered question on so: how include , use cordova plugins
Comments
Post a Comment