dart-archive / angular.dart

Legacy source repository. See github.com/dart-lang/angular
https://webdev.dartlang.org/angular/
1.25k stars 248 forks source link

Routing doesn't work in Firefox #956

Closed jpink closed 10 years ago

jpink commented 10 years ago

If you try the last Tutorial chapter 6 which uses routing and views, it works as Dart in Dartium and as JS in Chrome and IE but not in Firefox. I only see "Loading recipes..." for a short time and then blank white screen. Any suggestions how to debug?

vicb commented 10 years ago

What version of angular do you use ? What version of firefox do you use ? Have you checked the (closed) issues for duplicates ?

jpink commented 10 years ago

Dart Editor version 1.3.3.release (STABLE) Dart SDK version 1.3.3 Firefox 28.0 pubspec.yaml in Chapter_06 project: dependencies: angular: 0.10.0 browser: any js: any shadow_dom: any http_server: any route_hierarchical: '>=0.4.18 <0.5.0' dev_dependencies: unittest: any transformers:

I didn't found duplicates at least open issues. Trying to look the closed one and Google a bit...

vicb commented 10 years ago

Some firefox issues have been fixed in route_hierarchical 0.4.18, could you make sure you have at least this version - check your lock file. Thanks.

jpink commented 10 years ago

As you can see our Tutorial project has "route_hierarchical: '>=0.4.18 <0.5.0'" in yaml file and the lock file contains the latest version: "0.4.18".

vicb commented 10 years ago

oops sorry... I don't have the time to dig into this right now. One thing that could help is to try with the master branch and report if it helps (there are quite some changes required since 0.10.0, check the demos for working examples)

jpink commented 10 years ago

Now i got simple routing example working on FF. I updated route_hierarchical to 0.4.19 and di to 0.0.40. I'm not sure which one fixed it.

But when run pub upgrade for tutorial project the Firebug JS console says (and it still not working): NoSuchMethodError: Cannot call "get$onHashChange" (t3.get$onHashChange is not a function)

STACKTRACE: .Router.listen$2$appRoot$ignoreClick@http://127.0.0.1:4031/main.dart.js:34498 .Router.listen$1$appRoot@http://127.0.0.1:4031/main.dart.js:34518 .NgRoutingHelper.NgRoutingHelper$4@http://127.0.0.1:4031/main.dart.js:14252 .NgRoutingHelper.static.NgRoutingHelper$@http://127.0.0.1:4031/main.dart.js:14256 .closure305.call$1<@http://127.0.0.1:4031/main.dart.js:17794 .StaticInjector.newInstanceOf$4@http://127.0.0.1:4031/main.dart.js:31058 .TypeProvider.get$4<@http://127.0.0.1:4031/main.dart.js:31022 .BaseInjector.getInstanceByKey$3@http://127.0.0.1:4031/main.dart.js:30780 .BaseInjector.getInstanceByKey$3@http://127.0.0.1:4031/main.dart.js:30778 .BaseInjector.get$2<@http://127.0.0.1:4031/main.dart.js:30803 .BaseInjector.get$2<@http://127.0.0.1:4031/main.dart.js:30805 .closure306.call$1<@http://127.0.0.1:4031/main.dart.js:17807 .StaticInjector.newInstanceOf$4@http://127.0.0.1:4031/main.dart.js:31058 .TypeProvider.get$4<@http://127.0.0.1:4031/main.dart.js:31022 .BaseInjector.getInstanceByKey$3@http://127.0.0.1:4031/main.dart.js:30780 .BaseInjector.get$2<@http://127.0.0.1:4031/main.dart.js:30803 .BaseInjector.get$2<@http://127.0.0.1:4031/main.dart.js:30805 .ElementBinderlink_closure.call$1<@http://127.0.0.1:4031/main.dart.js:4923 .IterableMixinWorkaround_forEach<@http://127.0.0.1:4031/main.dart.js:17966 .ElementBinder._link$5@http://127.0.0.1:4031/main.dart.js:4725 .ElementBinder.bind$3<@http://127.0.0.1:4031/main.dart.js:4781 .TaggingViewFactory._bindTagged$5@http://127.0.0.1:4031/main.dart.js:6443 .TaggingViewFactory._link$4@http://127.0.0.1:4031/main.dart.js:6492 .TaggingViewFactory.call$2<@http://127.0.0.1:4031/main.dart.js:6425 .TaggingViewFactory.call$2<@http://127.0.0.1:4031/main.dart.js:6430 .BoundViewFactory.viewFactory$1@http://127.0.0.1:4031/main.dart.js:6570 .BoundViewFactory.call$1<@http://127.0.0.1:4031/main.dart.js:6577 ._Case.viewFactory$1@http://127.0.0.1:4031/main.dart.js:13181 .NgSwitch_value_closure0.call$1<@http://127.0.0.1:4031/main.dart.js:13168 .IterableMixinWorkaround_forEach<@http://127.0.0.1:4031/main.dart.js:17966 .JSArray.forEach$1@http://127.0.0.1:4031/main.dart.js:406 J.forEach$1$ax@http://127.0.0.1:4031/main.dart.js:35712 .NgSwitch.set$value@http://127.0.0.1:4031/main.dart.js:13140 J.set$value$x@http://127.0.0.1:4031/main.dart.js:36408 .closure0.call$2<@http://127.0.0.1:4031/main.dart.js:16203 .AccessScopeFast.setter$2@http://127.0.0.1:4031/main.dart.js:7909 .AccessFast._assign$3@http://127.0.0.1:4031/main.dart.js:8002 .AccessScopeFast.assign$2<@http://127.0.0.1:4031/main.dart.js:7917 .DynamicExpression.assign$2<@http://127.0.0.1:4031/main.dart.js:7124 J.assign$2$x@http://127.0.0.1:4031/main.dart.js:35670 .ElementBindercreateAttrMappings__closure2.call$2<@http://127.0.0.1:4031/main.dart.js:4904 .Watch.reactionFn$2@http://127.0.0.1:4031/main.dart.js:15136 .Watch.invoke$0@http://127.0.0.1:4031/main.dart.js:15146 .RootWatchGroup.detectChanges$5$changeLog$evalStopwatch$exceptionHandler$fieldStopwatch$processStopwatch@http://127.0.0.1:4031/main.dart.js:15082 .RootScope.digest$0<@http://127.0.0.1:4031/main.dart.js:9750 .Scope.apply$2<@http://127.0.0.1:4031/main.dart.js:9524 .Scope.apply$2<@http://127.0.0.1:4031/main.dart.js:9530 anonymous/<@http://127.0.0.1:4031/main.dart.js:2639 ._rootRun<@http://127.0.0.1:4031/main.dart.js:19101 ._ZoneDelegate.run$2@http://127.0.0.1:4031/main.dart.js:21103 .VmTurnZone._finishTurn$2@http://127.0.0.1:4031/main.dart.js:10436 .VmTurnZone._onRunBase$4@http://127.0.0.1:4031/main.dart.js:10407 .VmTurnZone._onRunUnary$5<@http://127.0.0.1:4031/main.dart.js:10414 anonymous/<@http://127.0.0.1:4031/main.dart.js:2651 ._ZoneDelegate.runUnary$3@http://127.0.0.1:4031/main.dart.js:21110 ._CustomizedZone.runUnary$2@http://127.0.0.1:4031/main.dart.js:21289 ._BaseZone.runUnaryGuarded$2@http://127.0.0.1:4031/main.dart.js:21192 ._BaseZone_bindUnaryCallback_closure.call$1<@http://127.0.0.1:4031/main.dart.js:21250 .invokeClosure_closure0.call$0<@http://127.0.0.1:4031/main.dart.js:3607 ._IsolateContext.eval$1<@http://127.0.0.1:4031/main.dart.js:1387 ._callInIsolate<@http://127.0.0.1:4031/main.dart.js:1075 .invokeClosure<@http://127.0.0.1:4031/main.dart.js:2528 .convertDartClosureToJS</$function@http://127.0.0.1:4031/main.dart.js:2545

mvuksano commented 10 years ago

Filed a related issue - https://code.google.com/p/dart/issues/detail?id=18482

pavelgj commented 10 years ago

I think the problem is that tutorial is still using the outdated shadow_dom polyfill package. Need to switch to web_components. @naomiblack

vicb commented 10 years ago

@pavelgj what is the difference between shadow_dom and web_components ?

By looking at pub I can see that the later seems maintained while the former has not been updated since January. However there's no indication in shadow_dom that says it's deprecated.

Bottom line: should we also switch for angular.dart which depends on shadow_dom ?

pavelgj commented 10 years ago

shadow_dom was an attempt to maintain https://github.com/Polymer/ShadowDOM as a separate package, while it was never meant to be used independently. shadow_dom is essentially abandoned. There were several critical bug fixes done since the last time shadow_dom was rolled (Jan 31, 2014). web_components supersedes shadow_dom.

vicb commented 10 years ago

Thanks for the explanation :+1:

vicb commented 10 years ago

a dartbug exists: 18080

vicb commented 10 years ago

Closing this issue as it is related to the deprecated shadow DOM polyfill, feel free to reopen if the bug is still here