Make use of DI for angularjs

This is needed for javascript compression
Merge pull request #81 from kaznum/di-for-angularjs

Make use of DI for angularjs