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

Commit

Permalink
Clean up article example
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed May 2, 2014
1 parent 31a1931 commit 0b3dead
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions public/modules/articles/controllers/articles.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa

$scope.update = function() {
var article = $scope.article;
if (!article.updated) {
article.updated = [];
}
article.updated.push(new Date().getTime());

article.$update(function() {
$location.path('articles/' + article._id);
Expand All @@ -50,16 +46,12 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
};

$scope.find = function() {
Articles.query(function(articles) {
$scope.articles = articles;
});
$scope.articles = Articles.query();
};

$scope.findOne = function() {
Articles.get({
$scope.article = Articles.get({
articleId: $stateParams.articleId
}, function(article) {
$scope.article = article;
});
};
}
Expand Down

0 comments on commit 0b3dead

Please sign in to comment.