I have successfully created a basic angular5 component called HelloComponent
:
var HelloComponent = function () {
};
HelloComponent.annotations = [
new ng.core.Component({
selector: 'hello-world',
template: 'Hello World!'
})
];
Now, I attempted to integrate this component into my angularJS directive like so:
angular.module("app", [])
.directive("helloWorld", ng.upgrade.static.downgradeComponent(HelloComponent))
However, upon running the script, I encountered the following error:
Error: [$injector:unpr] Unknown provider: $$angularLazyModuleRefProvider <- $$angularLazyModuleRef http://errors.angularjs.org/1.6.5/$injector/unpr?p0=%24%24angularLazyModuleRefProvider%20%3C-%20%24%24angularLazyModuleRef
To see a simple example using angular 5 and angularJS, check out: http://plnkr.co/edit/dQJ2tgV2MuInT41ucjq1
Any suggestions on how to resolve this issue?
ADDITIONAL INFORMATION
An example of downgrading a component from v4 to v1 can be found here:
However, when attempting to update my application based on this article, I encountered another error:
Unknown provider: $$angularInjectorProvider
Check out the example for v4 here: http://plnkr.co/edit/9Oxy0QeSg1FYve0cjGYw
A similar example for v5 resulted in the old error message:
Unknown provider: $$angularLazyModuleRefProvider
For a v5 example, visit: http://plnkr.co/edit/eZScm8U41mGuuHJMjApV