angular.dart icon indicating copy to clipboard operation
angular.dart copied to clipboard

Ability to run hybrid apps on phones

Open cinan opened this issue 12 years ago • 2 comments

Currently (AngularDart 1.0) it's not possible to run hybrid apps (wrapped in Cordova e.g.). I've cloned official AngularDart tutorial and wrapped Chapter 2 in Cordova and I got this this error:

Bad state: Cannot use origin without a scheme: 
file:///home/cinan/dartdevelopment/test2/platforms/browser/www/index.html

Are the any plans for supporting hybrid apps? (Or am I doing something wrong?)

cinan avatar Nov 12 '14 19:11 cinan

No, you are not doing anything wrong. This is your solution: https://github.com/angular/angular.dart/pull/1557

Also, depending on what you are using to package your app (mobile chrome apps), you will need to use csp: true in the dart2js options. Your yaml should have something like this:

  • $dart2js: checked: false minify: true verbose: true analyzeAll: false commandLineOptions: [ --show-package-warnings ] #, --dump-info] suppressWarnings: false suppressHints: false terse: true csp: true # <- THIS!

vmendi avatar Nov 12 '14 19:11 vmendi

Thank you very much!

cinan avatar Nov 12 '14 19:11 cinan