Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
(function () {
|
||||
global.dashModule
|
||||
.controller('contactPageCtrl', ['$scope', '$http', 'utilsService', contactPageCtrl])
|
||||
.directive('contactPage', [contactPageDirective]);
|
||||
|
||||
function contactPageDirective() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'contact/html/contactTemplate'
|
||||
};
|
||||
}
|
||||
|
||||
function contactPageCtrl($scope, $http, utilsService) {
|
||||
$scope.contactInfo = [];
|
||||
$scope.getContactInfo = getContactInfo;
|
||||
|
||||
function getContactInfo() {
|
||||
$http({
|
||||
method: 'GET',
|
||||
url: 'contact/api/getContactInfo'
|
||||
}).then(setContactInfo, utilsService.onHttpError);
|
||||
}
|
||||
|
||||
function setContactInfo(response) {
|
||||
if(response.data){
|
||||
$scope.contactInfo = response.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user