I have the interface-factory.js file that is my factory
app.factory('interfaceAPI', function ($http) {
var _getInterface = function () {
return $http.get("/api/interfaceapi/getall");
};
var _postInterface = function (objeto) {
return $http.post("/api/interfaceapi/post", objeto);
};
var _deleteInterface = function (Id) {
return $http.delete("/api/interfaceapi/delete/" + Id);
};
return {
getInterface: _getInterface,
postInterface: _postInterface,
deleteInterface: _deleteInterface
};
});
The token is already being generated and being saved from the localStorage, I would like to know how to pass the token on the header of each request.