I'm having some problems trying to make http calls inside the same javascript controller which it gives me the error: 'function is not defined'
If I move the function to the outside of controller, i can't use $http dependency.. So here's my problem...
What should i use?
I'm trying to call this function through an onclick event on a div that I created dinamically.
I've already tried this but it also does not work:
function MyController($scope,$http,$resource) {
function activateSmartcase(deviceId) {
};
}
Thanks
$scopeor thethiscontext depending on how the controller is invoked, either vanilla syntax or controllerAs syntax.