Comments (6)
I just released ver 3.1.4 which should resolve this.
from angular-hybrid.
Yes, AOT compatibility should work, if you follow all the steps listed in the README, or better yet copy the code from the example (it's more complete and up-to-date).
from angular-hybrid.
@mischkl thank you for your comment, I went through the README another time to check if I have left something important out. I believe I have all important parts covered, after all, the JIT version is working well.
I suspect a bug either in the angular-hybrid package or in the way rollup is resolving the package.
To make it apparent I have created a minimal example derived from the minimal example of angular-hybrid here:
https://github.com/ui-router/angular-hybrid/tree/master/example
and applying the steps to make AOT work from the offical angular guidelines page:
https://angular.io/guide/aot-compiler
This way I needed to adjust the package.json, tsconfig.json and main.ts files, and I needed to introduce app,module.ts and rollup-config.js files, all of which can be found adjusted inside this plunker:
https://plnkr.co/edit/tmViEDxH7PFaQkL0qKU7?p=info
The result of running rollup on the AOT compiled code is this error mesaage:
uirouter/angular-hybrid is imported by src\app.module.js, but could not be resolved - treating it as an external dependency
I would really appreciate any help here as this is a stopper for our application if we should rely on using ui-router.
from angular-hybrid.
@JiriPelnar can you provide instructions on how to reproduce the error message? perhaps put it in a git repo that I can clone, run yarn && ngc && rollup -c rollup-config.js
or whatever the instructions should be?
If I can reproduce it in the plunker, please provide step by step instructions
from angular-hybrid.
Thank you @christopherthielen for looking into this issue. The problem may be on my part, as I might still be missing something, but I am unable to figure out what that could be. However, I put together this repository with the necessary steps to reproduce the rollup error explained in detail in its readme.
Also, please note this answer from @Radim-Kohler to my question related to the same issue on stack overflow. Adjusting the rollup-config the way proposed in the answer makes the rollup step work just fine and it makes me think that maybe the structure of angular-hybrid package can be changed to work with rollup without this special configuration in rollup-config.
from angular-hybrid.
Thank and thank you very much for doing this amazing library. I have tested the version 3.1.4 and it indeed works for the angular-hybrid case. I believe a similar fix is also needed for uirouter/core, for which I still need to keep the custom resolver in rollup config in place.
from angular-hybrid.
Related Issues (20)
- Jest test suite failed to run AngularJS v1.x is not loaded! after upgrade from angular 7 to 9 HOT 6
- How to augment all routes with additional resolve using decorator HOT 2
- ui.router.upgrade' is not available! HOT 1
- Angular 9 - optimization: true breaks build HOT 1
- Version 12 causes "Unknown provider" on Angular states HOT 12
- Upgraded AngularJS component renders itself in ui-view HOT 1
- The target entry-point "@uirouter/angular-hybrid" has missing dependencies HOT 2
- Support for angular12 HOT 5
- UIViewNgUpgrade downgradedModule not specified HOT 1
- ngcc fails
- Angular 14 compatibility HOT 6
- Error bootstrapping AppModule Error: Cannot read properties of undefined (reading 'when') HOT 1
- Failure to inject $transition$ into a downgraded ng2 component HOT 9
- Angular 15 compatibility HOT 3
- After update to 15: UI router error TypeError: this.factory is undefined HOT 19
- random error: Cannot find module '@uirouter/angularjs' or its corresponding type declarations. HOT 3
- Add support for v16 in @uirouter/angular-hybrid HOT 3
- After update to v15.0.2 I get this error "Cannot read properties of undefined (reading 'inherit')"
- Wrong NATIVE_INJECTOR_TOKEN import HOT 2
- Add support for v17 in @uirouter/angular-hybrid HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-hybrid.