diff --git a/app/controllers/articles.server.controller.js b/app/controllers/articles.server.controller.js
index 8eb757bc1b..f23f2abb88 100644
--- a/app/controllers/articles.server.controller.js
+++ b/app/controllers/articles.server.controller.js
@@ -99,8 +99,8 @@ exports.articleByID = function(req, res, next, id) {
if (err) return next(err);
if (!article) {
return res.status(404).send({
- message: 'Article not found'
- });
+ message: 'Article not found'
+ });
}
req.article = article;
next();
diff --git a/app/controllers/users/users.password.server.controller.js b/app/controllers/users/users.password.server.controller.js
index 63c20b5d61..765aad0b49 100644
--- a/app/controllers/users/users.password.server.controller.js
+++ b/app/controllers/users/users.password.server.controller.js
@@ -12,7 +12,7 @@ var _ = require('lodash'),
nodemailer = require('nodemailer'),
async = require('async'),
crypto = require('crypto');
-
+
var smtpTransport = nodemailer.createTransport(config.mailer.options);
/**
diff --git a/app/tests/article.server.model.test.js b/app/tests/article.server.model.test.js
index 9ced1d467a..b4b76b8a93 100644
--- a/app/tests/article.server.model.test.js
+++ b/app/tests/article.server.model.test.js
@@ -58,7 +58,7 @@ describe('Article Model Unit Tests:', function() {
afterEach(function(done) {
Article.remove().exec(function() {
- User.remove().exec(done);
+ User.remove().exec(done);
});
});
});
diff --git a/app/tests/article.server.routes.test.js b/app/tests/article.server.routes.test.js
index 55716a1496..7eb5f77293 100644
--- a/app/tests/article.server.routes.test.js
+++ b/app/tests/article.server.routes.test.js
@@ -274,7 +274,7 @@ describe('Article CRUD tests', function() {
afterEach(function(done) {
User.remove().exec(function() {
- Article.remove().exec(done);
+ Article.remove().exec(done);
});
});
});
diff --git a/app/views/layout.server.view.html b/app/views/layout.server.view.html
index 220a2003e9..6c038146ae 100644
--- a/app/views/layout.server.view.html
+++ b/app/views/layout.server.view.html
@@ -36,7 +36,8 @@
{% for cssFile in cssFiles %}
- {% endfor %}
+
+ {% endfor %}
{% for jsFile in jsFiles %}
- {% endfor %}
+
+ {% endfor %}
{% if process.env.NODE_ENV === 'development' %}
diff --git a/config/env/all.js b/config/env/all.js
index 66fc2082c0..2c302c83b1 100644
--- a/config/env/all.js
+++ b/config/env/all.js
@@ -14,7 +14,7 @@ module.exports = {
// The name of the MongoDB collection to store sessions in
sessionCollection: 'sessions',
// The session cookie settings
- sessionCookie: {
+ sessionCookie: {
path: '/',
httpOnly: true,
// If secure is set to true then it will cause the cookie to be set
@@ -25,7 +25,7 @@ module.exports = {
// Only set the maxAge to null if the cookie shouldn't be expired
// at all. The cookie will expunge when the browser is closed.
maxAge: null,
- // To set the cookie in a specific domain uncomment the following
+ // To set the cookie in a specific domain uncomment the following
// setting:
// domain: 'yourdomain.com'
},
diff --git a/public/modules/articles/controllers/articles.client.controller.js b/public/modules/articles/controllers/articles.client.controller.js
index 364987eb9e..d90ec3dc5d 100644
--- a/public/modules/articles/controllers/articles.client.controller.js
+++ b/public/modules/articles/controllers/articles.client.controller.js
@@ -1,17 +1,23 @@
'use strict';
+// Articles controller
angular.module('articles').controller('ArticlesController', ['$scope', '$stateParams', '$location', 'Authentication', 'Articles',
function($scope, $stateParams, $location, Authentication, Articles) {
$scope.authentication = Authentication;
+ // Create new Article
$scope.create = function() {
+ // Create new Article object
var article = new Articles({
title: this.title,
content: this.content
});
+
+ // Redirect after save
article.$save(function(response) {
$location.path('articles/' + response._id);
+ // Clear form fields
$scope.title = '';
$scope.content = '';
}, function(errorResponse) {
@@ -19,6 +25,7 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
});
};
+ // Remove existing Article
$scope.remove = function(article) {
if (article) {
article.$remove();
@@ -35,6 +42,7 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
}
};
+ // Update existing Article
$scope.update = function() {
var article = $scope.article;
@@ -45,10 +53,12 @@ angular.module('articles').controller('ArticlesController', ['$scope', '$statePa
});
};
+ // Find a list of Articles
$scope.find = function() {
$scope.articles = Articles.query();
};
+ // Find existing Article
$scope.findOne = function() {
$scope.article = Articles.get({
articleId: $stateParams.articleId
diff --git a/public/modules/articles/tests/articles.client.controller.test.js b/public/modules/articles/tests/articles.client.controller.test.js
index 7e25c699bb..677cb99431 100644
--- a/public/modules/articles/tests/articles.client.controller.test.js
+++ b/public/modules/articles/tests/articles.client.controller.test.js
@@ -2,7 +2,7 @@
(function() {
// Articles Controller Spec
- describe('ArticlesController', function() {
+ describe('Articles Controller Tests', function() {
// Initialize global variables
var ArticlesController,
scope,