I usually inject dependencies using inline annotations like this
angular.module('app')
.controller('SampleController',['$scope','ngDependacy',sampleController]);
function sampleController($scope,ngDependacy) {
//perform actions
}
But currently, I am attempting to inject a dependency with an object as the name, and encountering errors. Here is my code:
angular.module('app')
.controller('SampleController',['$scope','ng.Dependacy',sampleController]);
function sampleController($scope,ng.Dependacy) {
//perform actions
}
How can I successfully inject this dependency where the name includes a dot?