0

I have made one blank ionic project and created a Mobile First Hybrid application in the Worklight studio on Eclipse. I have made the necessary changes according to this blog.

When I build my project and launch it on my android phone I am getting this as an error:

ionic.bundle.js:13440 Uncaught Error: [$injector:modulerr] Failed to instantiate module ng due to:
TypeError: Cannot set property 'aHrefSanitizationWhitelist' of null
    at $$SanitizeUriProvider (file:///android_asset/www/default/ionic/js/ionic.bundle.js:30847:35)
    at new <anonymous> (file:///android_asset/www/default/worklight/worklight.js:951:20)
    at Object.instantiate (file:///android_asset/www/default/ionic/js/ionic.bundle.js:18012:14)
    at provider (file:///android_asset/www/default/ionic/js/ionic.bundle.js:17826:36)
    at file:///android_asset/www/default/ionic/js/ionic.bundle.js:13737:32
    at forEach (file:///android_asset/www/default/ionic/js/ionic.bundle.js:13707:20)
    at Object.provider (file:///android_asset/www/default/ionic/js/ionic.bundle.js:17816:9)
    at ngModule (file:///android_asset/www/default/ionic/js/ionic.bundle.js:15865:16)
    at Object.invoke (file:///android_asset/www/default/ionic/js/ionic.bundle.js:17997:19)
    at runInvokeQueue (file:///android_asset/www/default/ionic/js/ionic.bundle.js:17890:35)
http://errors.angularjs.org/1.5.3/$injector/modulerr?p0=ng&p1=TypeError%3A%…Fandroid_asset%2Fwww%2Fdefault%2Fionic%2Fjs%2Fionic.bundle.js%3A17890%3A35)

My Mobile First version is 8, Ionic is 1.3, and Angular is 1.5.3.

edwinksl
  • 7,005
  • 4
  • 30
  • 36
Vikram Prasad
  • 165
  • 14

1 Answers1

0

A fix was recently done in the MobileFirst Foundation 8.0 client SDK to fix compatibility with Ionic 1.x and AngularJS 1.5.3. The fix is scheduled to be published in a future iFix.

If the fix is urgent for you, and you are an IBM customer, you can open a support ticket to be notified once it is available for publication.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • thanks for the info Idan...so can you please tell what previous versions of Mobile First + Ionic + Angular Js go hand in hand ?? – Vikram Prasad Aug 18 '16 at 05:09
  • The fix for 8.0 should now be available. Remove and re-add the MFP core Cordova plug-in from your Cordova project. – Idan Adar Aug 18 '16 at 05:10
  • mine is an ionic project, so i could not resolve according to http://stackoverflow.com/questions/38902169/mobilefirst-v8-and-bootstrap-angular-js-v1-5-3-error – Vikram Prasad Aug 18 '16 at 05:26
  • What does that matter? An ionic app is still a cordova app, to which you add the mfp cordova plug-in. Did you try? – Idan Adar Aug 18 '16 at 05:27
  • i could not find this path Android - Project/plugins/cordova-plugin-mfp/src/android/assets/www/worklight/worklight.js ...which got mentioned in the other post(one which you marked my question duplicate for) in my WL Project...i found one under the android folder..but whats the use of overriding the worklight.js when we are going to remove and readd the platform again ? – Vikram Prasad Aug 19 '16 at 04:55
  • You only need to remove and re-add the plug-in in case the fix is in it. If you tried it and it did not work, it means the fix is not released yet. Instead you need to override the file. – Idan Adar Aug 19 '16 at 05:04
  • Okay Idan please guide me through the steps..i got this ionic project built..intsalled cordova-plugin-mfp..added android platform to it...modified the worklight.js under myIonicProject/plugins/cordova-plugin-mfp/src/android/assets/www/worklight/worklight.js What steps do i need to take to import it correctly inside my worklight project and get it running on my connected android device – Vikram Prasad Aug 19 '16 at 05:43
  • You need to run "cordova prepare" and then "cordova build" or "cordova run". – Idan Adar Aug 19 '16 at 05:45
  • what about copying files from my ionic project to the mobilefirst project ? – Vikram Prasad Aug 19 '16 at 05:48