Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 4451ba7

Browse files
committed
tab indent fix
1 parent d7bb81d commit 4451ba7

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

public/modules/articles/controllers/articles.client.controller.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
55
$scope.authentication = Authentication;
66

77
$scope.create = function(isValid) {
8-
if (isValid) {
9-
var article = new Articles({
10-
title: this.title,
11-
content: this.content
12-
});
13-
article.$save(function(response) {
14-
$location.path('articles/' + response._id);
15-
}, function(errorResponse) {
16-
$scope.error = errorResponse.data.message;
17-
});
18-
19-
this.title = '';
20-
this.content = '';
21-
}else{
22-
$scope.submitted = true;
23-
}
8+
if (isValid) {
9+
var article = new Articles({
10+
title: this.title,
11+
content: this.content
12+
});
13+
article.$save(function(response) {
14+
$location.path('articles/' + response._id);
15+
}, function(errorResponse) {
16+
$scope.error = errorResponse.data.message;
17+
});
18+
19+
this.title = '';
20+
this.content = '';
21+
} else {
22+
$scope.submitted = true;
23+
}
2424
};
2525

2626
$scope.remove = function(article) {
@@ -40,17 +40,17 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
4040
};
4141

4242
$scope.update = function(isValid) {
43-
if (isValid) {
44-
var article = $scope.article;
43+
if (isValid) {
44+
var article = $scope.article;
4545

46-
article.$update(function() {
47-
$location.path('articles/' + article._id);
48-
}, function(errorResponse) {
49-
$scope.error = errorResponse.data.message;
50-
});
51-
}else{
52-
$scope.submitted = true;
53-
}
46+
article.$update(function() {
47+
$location.path('articles/' + article._id);
48+
}, function(errorResponse) {
49+
$scope.error = errorResponse.data.message;
50+
});
51+
} else {
52+
scope.submitted = true;
53+
}
5454
};
5555

5656
$scope.find = function() {

0 commit comments

Comments
 (0)