Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

bootstrapping and angular docs #39

Closed
ealtenho opened this issue Aug 8, 2014 · 17 comments
Closed

bootstrapping and angular docs #39

ealtenho opened this issue Aug 8, 2014 · 17 comments

Comments

@ealtenho
Copy link
Contributor

ealtenho commented Aug 8, 2014

We currently have two methods of dealing with bootstrapping since protractor uses bootstrapping and we use bootstrapping to add in our AngularHintModules.

The angular docs must also used defered bootstrapping because they are tripping our protractor deferring bootstrap logic. However, they also seem to be reaching the normal bootstrapping logic. I think this double bootstrapping is causing the following error:

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.0-local+sha.6140861/$injector/modulerr?p0=n…rors.angularjs.org%2F1.3.0-local%2Bsha.6140861%2F%24injector%2Fmodulerr%3F...<omitted>...1) angular.js:36
(anonymous function) angular.js:36
(anonymous function) angular.js:4003
q angular.js:328
f angular.js:3964
Gb angular.js:3904
d angular.js:1500
Qa.resumeBootstrap angular.js:1523
maybeBootstrap

@btford any thoughts on how to approach this?

@btford
Copy link
Contributor

btford commented Aug 9, 2014

we determined that it may be trying to bootstrap twice

@ealtenho
Copy link
Contributor Author

ealtenho commented Aug 9, 2014

I'm still uncertain about what is going on here. Our call to resumeBootstrap seems to be what causes the thrown error (although the docs site still appears broken whether or not this error is thrown). Specifically, when the module ng tries to instantiate ngLocale the runBlocks for ngLocale is empty and causes an error.

@ealtenho
Copy link
Contributor Author

ealtenho commented Aug 9, 2014

I don't think that we are bootstrapping twice. I think that the bootstrapping of ngLocale is failing.

@ealtenho
Copy link
Contributor Author

ealtenho commented Aug 9, 2014

Okay... I tried removing all of our hint modules to see if one of them is causing the error, and I still see it triggered. So it would have to be an error in the overall AngularHint logic.

@ealtenho
Copy link
Contributor Author

ealtenho commented Aug 9, 2014

I don't know very much about the angular-loader, but I think that it, rather than the AngularHint logic is causing this particular error. For me, building a hint-bundle with just the injector logic calls doBootstrap and attempts to instantiate the empty ngLocale that cause the failure. @btford any insights with regard to the behavior of the loader?

@ealtenho
Copy link
Contributor Author

I was wondering if I could reproduce this behavior by looking at other sites built with Angular. Both https://builtwith.angularjs.org/ and https://www.virginamerica.com/ are broken by the use of AngularHint, although all the module messages appear to work the same. @caguillen214, it seems like our first priority would be to look at these. Especially https://www.virginamerica.com/ seems to be a good example of how AngularHint could be used with a real application. However, both these sites do not have the same issue as the Angulardocs.

@ealtenho
Copy link
Contributor Author

The https://www.virginamerica.com/ site is broken with the use of ngHintDom and ngHintInterpolation.

@ealtenho
Copy link
Contributor Author

The builtwithangular site is broken with the use of ngHintDom, ngHintEvents and ngHintInterpolation.

@btford
Copy link
Contributor

btford commented Aug 11, 2014

i'm wondering if it's angular-loader + ngLocale that's giving us problems.

@ealtenho
Copy link
Contributor Author

For the docs site, definitely.

@btford
Copy link
Contributor

btford commented Aug 11, 2014

I'd focus on the issues you identified, and we can return to the ngLocale thing tomorrow when I'm back.

@ealtenho
Copy link
Contributor Author

Ok, our plan will to be try to fix individual modules to get a solid demo going for one of these other sites.

@btford
Copy link
Contributor

btford commented Aug 11, 2014

👍

@ealtenho
Copy link
Contributor Author

Update: the angular docs site was broken by using an outdated version of Angular loader. However, using the updated Angular loader (1.3) was incompatible with sites running Angular 1.2. Hence we created our own modified loader to work with both versions of Angular, see angular/batarang@e5e6677

@ealtenho
Copy link
Contributor Author

The https://www.virginamerica.com/ site is broken with the use of ngHintDom and ngHintInterpolation.

ngHintDom is unfeasible except for the patching of action taking place directly within the controller in the current implementation. An alternative solution is being explored.

Issues with ngHintInterpolation were addressed and the module no longer breaks the virginamerica site.

@ealtenho
Copy link
Contributor Author

The builtwithangular site is broken with the use of ngHintDom, ngHintEvents and ngHintInterpolation

Again, ngHintDom is being revisited, the problem with ngHintEvents is that older builds of Angular have different events, and ngHintInterpolation no longer stops the site from loading correctly (although it does cause harmless exceptions to be thrown - currently being investigated).

ealtenho pushed a commit to angular/batarang that referenced this issue Aug 13, 2014
… and 1.3

A breaking change with the loading of config blocks between angular 1.2 and 1.3 causes
a an error when registering providers if the appropriate version of angular loader is not
used. This custom loader alters the invokeQueue to use config blocks correctly for both
versions of angular. See the issue with the loader and angular docs:
angular/angular-hint#39 And the breaking change for the
angular loader: angular/angular.js@c0b4e2d
@gkalpak
Copy link
Member

gkalpak commented Apr 2, 2017

Closing since the angularjs.org issue is tracked in #88.

@gkalpak gkalpak closed this as completed Apr 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants