I have controller and inside a $timeout function:
.controller('MapCtrl', ['$scope', '$http', '$log', '$timeout', function ($scope, $http, $interval, $log, $timeout) {
$timeout(function () {
$scope.marker.coords = {
latitude: 42.1451,
longitude: -100.6680
};
$scope.dynamicMoveCtr++;
$timeout(function () {
$scope.marker.coords = {
latitude: 43.1451,
longitude: -102.6680
};
$scope.dynamicMoveCtr++;
}, 2000);
}, 1000);
}]);
Why it gives me error:
typeError: $timeout is not a function at new (angularmy.js:2879) at Object.e [as invoke] (angular.min.js:36) at $get.x.instance (angular.min.js:75)
At another controller function $timeout works correct