Skip to content

Commit

Permalink
litle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmunir committed Aug 23, 2015
1 parent 2b20d03 commit 0e2e04d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions generators/angular/default/views/js/create.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
},function(r){
$scope.errors = {status: r.status, text: r.statusText, data: {}};
if (r.status == 422) {
for (key in r.data) {
$scope.errors.data[r.data[key].field] = r.data[key].message;
}
angular.forEach(r.data,function(err) {
$scope.errors.data[err.field] = err.message;
});
}
});
}
Expand Down
6 changes: 3 additions & 3 deletions generators/angular/default/views/js/update.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
},function(r){
$scope.errors = {status: r.status, text: r.statusText, data: {}};
if (r.status == 422) {
for (key in r.data) {
$scope.errors.data[r.data[key].field] = r.data[key].message;
}
angular.forEach(r.data,function(err) {
$scope.errors.data[err.field] = err.message;
});
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion generators/angular/default/views/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'/<?= $prefixRoute; ?>:id' => [
'view' => 'view',
'js' => 'js/view.js',
'di' => ['<?= $restName;?>',],
'injection' => ['<?= $restName;?>',],
],
],
'resources' => [
Expand Down

0 comments on commit 0e2e04d

Please sign in to comment.