Comments (4)
Thanks for giving it a try!
The problem is in the arrow function, you cannot use them in provider declaration because the context is not statically inferable.
As I've mentioned in the readme, the project needs to be compatible with the AoT compilation of the framework.
from ngrev.
If thats the case, could you give me some direction in how I should write such code to make it work without arrow functions? I tried doing something like moving the function into an exported function in the same file, but I still got the error.
It doesn't make much sense if there is no simple way to provide with useFactory and use AoT in the same time right?
from ngrev.
You can use traditional function expression:
{
provide: APP_INITIALIZER,
useFactory: function (configService: ConfigService) {
return function () {
configService.load();
}
},
deps: [ConfigService],
multi: true
}
from ngrev.
I see, ill give it a try, thanks :)
from ngrev.
Related Issues (20)
- Broken build HOT 6
- Duplicated application root module HOT 4
- basic question angularJS and JSP
- can't parse nx app HOT 1
- Support - I cannot understand how it's working.
- Cannot drag vertically
- error parsing dependencies if a service has an inherited constructor.
- Error while parsing project for Angular 12 App HOT 3
- Macos version
- Error parsing project HOT 8
- Error parsing with lazy loading modules HOT 1
- useFactory with Lambda fails HOT 1
- Injectables visualisation HOT 4
- feature: component's detail view
- feature: component's view
- feature: additional view with analysed info
- bug: show libs option doesn't work in module view
- feature: change colour of libs modules
- feature(module view): show modules where the selected module is imported
- Add support for template visualization
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 ngrev.