GithubHelp home page GithubHelp logo

Comments (5)

doktordirk avatar doktordirk commented on May 27, 2024

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.

gama410 avatar gama410 commented on May 27, 2024

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.

doktordirk avatar doktordirk commented on May 27, 2024

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.

StrahilKazlachev avatar StrahilKazlachev commented on May 27, 2024

Most such dynamic additions are not meant to be public APIs.

from dependency-injection.

gama410 avatar gama410 commented on May 27, 2024

Thanks for your insight!

from dependency-injection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.