jmbledsoe / angularjs-visualstudio-intellisense

Visual Studio extension providing statement completion for injected AngularJS components in JavaScript files.
MIT License
110 stars 22 forks source link

Not working when chaining in a call to .config #1

Closed madskristensen closed 10 years ago

madskristensen commented 10 years ago

This doesn't work

var myApp = angular
    .module('nameApp', ['ngRoute'])
    .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
        $locationProvider.html5Mode(true);
    }]);

myApp.controller('nameController', ['$scope', '$location', function ($scope, $location) {
    // $location. // doesn't work
}]);

Whereas this does:

var myApp = angular
    .module('nameApp', ['ngRoute']);

myApp.controller('nameController', ['$scope', '$location', function ($scope, $location) {
    // $location. // It works!!
}]);
jmbledsoe commented 10 years ago

Fixed in commit https://github.com/jmbledsoe/angularjs-visualstudio-intellisense/commit/ed7a1e8a3823007cf4d343d79a9356b2177dbfb3