app.controller('attributeFormCtrl', ['$scope', '$route', '$log', '$modalInstance', 'attributeService', function($scope, $route, $log, $modalInstance, attributeService) {
$scope.someMethod = function(){
attributeService.getAllAttributeTypes().then(function(response){
$scope.attributeTypes=response.data;
}, function(error){
// some error occurred
});
attributeService.getAttributeById($scope.attributeId).then(function(response){
$scope.attribute=response.data;
},function(error) {
// error occurred.
});
};
$scope.cancel = function() {
$modalInstance.close();
};
$scope.someMethod();
}]);
app.controller('attributeFormCtrl', ['$scope',