I have created a new controller:
.controller('myCtrl', function($scope, $route, $routeParams, $location)
Now I am trying to inject something called SharedState. I attempted:
.controller('chatCtrl' ['SharedState', function($scope, $route, $routeParams, $location, SharedState)
and also:
.controller('chatCtrl' ['$scope','SharedState', '$route', '$routeParams', '$location', function($scope, SharedState, $route, $routeParams, $location)
Both attempts resulted in an error:
Error: [ng:areq] http://errors.angularjs.org/1.2.27/ng/areq?p0=myCtrl&p1=not%20aNaNunction%2C%20got%20undefined
What is the correct approach to successfully inject SharedState?