post new offering travel, and user page

This commit is contained in:
arnaucode
2017-01-26 14:13:32 +01:00
parent 5f16f060c1
commit 17f0f740d8
15 changed files with 177 additions and 104 deletions

View File

@@ -131,7 +131,7 @@ angular.module('starter', [
}
})
.state('app.user', {
url: '/users/:username',
url: '/users/:userid',
views: {
'menuContent': {
templateUrl: 'templates/user.html',
@@ -201,4 +201,31 @@ angular.module('starter', [
$translateProvider.useSanitizeValueStrategy('escape');
}]);
}])
.factory('httpInterceptor', function httpInterceptor($q, $window, $location) {
return {
request: function (config) {
return config;
},
requestError: function (config) {
return config;
},
response: function (res) {
return res;
},
responseError: function (res) {
return res;
}
}
})
.factory('api', function ($http) {
return {
init: function () {
$http.defaults.headers.common['X-Access-Token'] = localStorage.getItem("cim_app_token");
$http.defaults.headers.post['X-Access-Token'] = localStorage.getItem("cim_app_token");
}
};
})
.run(function (api) {
api.init();
});