di.js
di.js copied to clipboard
Can I use it with Angular 1.3.0?
I posted this on Stackoverflow and got a couple of likes but no answers, so I thought I would ask it here:
The new dependency injection that Volta spoke about at ng-conf and is contained here: https://github.com/angular/di.js is just what I am looking for for my AngularJS 1.3.0 project.
The problem is, it is not clear to me whether or not I can use it. There doesn't seem to be an example of using it for AngularJS v1 in the github project examples.
I came across an example using it in a Backbone project: http://teropa.info/blog/2014/03/18/using-angular-2-0-dependency-injection-in-a-backbone-app.html and I found an example of using ES6 in an AngularJS v1 project: https://github.com/mvolkmann/todo-es6/, but I can't find an example using the new DI in an Angular v1 project.
I'm confused. Any pointers?
Thanks for any help :)
@vojtajina I know DI is probably still in development but I also would like to try to use new DI with 1.3? :) Is it possible to get any guidelines? Thanks
there is no work on running di.js with angular... although it could be an interesting thing to work on.
@caitp so new DI will only work with Angular 2 is that correct?
just to clarify my code is written in ES6 but I am using Angular 1.3 as core library
It could work with 1.x, but it would be a bit of work to make it happen. I think it would be interesting, but currently is not something that has been worked on. I believe di.js is not even being used in angular/angular, but I'm not positive on that, and it's changing fast
Its just painful when you want to write an application with isomorphism in mind but end up using 2 different DI containers. :'(