-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed as not planned
Closed as not planned
Copy link
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: docsRelated to the documentationRelated to the documentationarea: upgradeIssues related to AngularJS → Angular upgrade APIsIssues related to AngularJS → Angular upgrade APIsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfeature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phasefreq3: highstate: needs eng input
Milestone
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
After upgrading an angular.js component and then making it available using downgradeComponent
from @angular/upgrade/static
, my angular.js karma test fails with:
Error: [$injector:unpr] Unknown provider: $$angularLazyModuleRefProvider <- $$angularLazyModuleRef
I'm not using a custom karma config. I'm just using the one generated by the angular-cli.
The upgrade guide at https://angular.io/guide/upgrade does not go into what you need to do to get tests running again when you have a hybrid application. It only covers upgrading the tests to angular. SO and Google are no help in this case.
Expected behavior
It should not fail and the docs should cover this scenario.
Minimal reproduction of the problem with instructions
This is my compatibility module for angular.js which is a dependency for the module i'm loading in my jasmine test (ng.mock.module):
export const compatModule = ng
.module('compat', [])
.directive('voPageFooter', downgradeComponent({ component: PageFooterComponent }) as ng.IDirectiveFactory)
.directive('voPageHeader', downgradeComponent({ component: PageHeaderComponent }) as ng.IDirectiveFactory)
.factory('ngZone', downgradeInjectable(NgZone));
What is the motivation / use case for changing the behavior?
Environment
Angular version: 6.0.2
Angular.js version: 1.6.9
samjulien, edarioq, Awk34, kaaku, kylietmo and 10 more
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: docsRelated to the documentationRelated to the documentationarea: upgradeIssues related to AngularJS → Angular upgrade APIsIssues related to AngularJS → Angular upgrade APIsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfeature: votes requiredFeature request which is currently still in the voting phaseFeature request which is currently still in the voting phasefreq3: highstate: needs eng input