angularjs - Angular Dart with Polymer and Service-Worker incompatibilty -


i'm trying build web app compatible google progressive web apps specs. use angular dart , polymer based webcomponents instead of angular components. far works expected. make app offline capable utilizing service-worker api use following dart lib: https://github.com/isoos/service_worker

using either polymer or service-worker works fine combining booth exits error on app startup.

this appcomponent startup routine:

// ... other imports import 'package:service_worker/window.dart' sw; // <-- import alone causes error  future main() async {   await initpolymer();  // <-- causes error in combination import above   bootstrap(appcomponent);    if (sw.isnotsupported) {     print('serviceworkers not supported.');     return;   }   //... initializing service worker } 

the error occurs if i'm not initializing service-worker, importing service-worker module enough cause error.

building app works without errors.

i'm new dart , polymer , angular eco systems , error message not helpful me:

uncaught error: nosuchmethoderror: method not found: js_helper.dart:1742 'h' (j.q(...).h not function)     @ object.j.h (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:9747:15)     @ http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:10559:1584     @ isolate.e.(anonymous function) (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:10608:15)     @ object.yk (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:9291:22)     @ http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:9282:10     @ ym.a (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:2612:72)     @ ym.dart.ym.$2 (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:2828:24)     @ y9.dart.y9.$1 (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:2824:31)     @ xm.bi (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:3767:40)     @ xk.$0 (http://127.0.0.1:8080/index.bootstrap.initialize.dart.js:3167:16) 

can give me hint cause error , how fix it? use polymer components instead of plain angular components need service-worker offline caching support.

this looks issue caused incompatibility between dart:js (the old style, used original polymer package) , package:js (the new style, used new packages, including package:service_worker).

you might want have @ polymerize project, brings polymer via new-style interop. you'll have no conflict.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -