app.controller('myController', ['$scope', '$http', '$filter', function($scope, $http, $filter) {
The above is an example of my code where I am trying to use $http.get
and also $filter
inside my controller
.
The only problem is when I use it like so, the console log throws an error that says $filter is not a function
.
app.controller('myController', ['$scope', '$http', '$filter', function($scope, $filter, $http) {
When I swap them round it throws an error that $http is undefined
$filter
in the dependency list, i.e.['$scope', '$http', '$filter', function($scope, $http, $filter) {...
– Epididymis