Comments (5)
the dependency injection and the container is agnostic towards other parts of aurelia. So, if some typecasting could be improved it'll have to be in aurelia-router
from dependency-injection.
Ok I was expecting this... Although I'm not sure how it could be made. In this case, it seems like the router dynamically adds some stuff at runtime to the Container. The problem comes at compile-time as the typings doesn't define this addition. And this typings is defined in aurelia-dependency-injection.
I understand this is purely a Typescript problem and probably due to the modules being originally written in Javascript but I was hoping that, as there was a discussion about migrating all code to typescript eventually, it would be resolved...
from dependency-injection.
you can raise that issue over at templating and/or templating-router which add that property. i guess they should introduce a export type ViewContainer = Container & {viewModel: itstype};
or something
from dependency-injection.
Most such dynamic additions are not meant to be public APIs.
from dependency-injection.
Thanks for your insight!
from dependency-injection.
Related Issues (20)
- @lazy not working with @autoinject HOT 7
- get rid of aurelia-pal dependency HOT 2
- Optional resolver doesn't work as expected HOT 2
- Proposal for easier way to inject via DI into a view-model HOT 10
- di, nodejs HOT 4
- Arrays and the DI Container HOT 26
- Version 1.4.0 does not contain the dist directory HOT 6
- 1.4.0 release and typings. HOT 3
- Unable to jspm bundle aurelia-dependency-injection 1.4 HOT 4
- Injecting a string resolves an empty string instead of undefined HOT 3
- Bug: Cannot use spread with the injector (Injection With Inheritance in Aurelia) HOT 19
- No access to global Container when used in node npm module HOT 5
- 1.4.2 release typings HOT 25
- error TS1005: ';' expected in TS typings HOT 1
- dependency-injection 1.5.0 incompatible to aurelia-validation 1.4.0 HOT 9
- error TS1110: Type expected HOT 6
- Building project in babel-loader fails on const enum because of --isolatedModules flag HOT 1
- Bug: @newInstance() becomes container default instance if it's the first instance
- Backport `resolve` from Aurelia 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 dependency-injection.