Skip to content

Commit ef69336

Browse files
committed
added settings route to app, fixed jshint warning
1 parent f5a9b25 commit ef69336

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: templates/javascript/app.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ angular.module('<%= scriptAppName %>', [<%= angularModules %>])<% if (ngRoute) {
1414
.when('/signup', {
1515
templateUrl: 'partials/signup',
1616
controller: 'SignupCtrl'
17+
})
18+
.when('/settings', {
19+
templateUrl: 'partials/settings',
20+
controller: 'SettingsCtrl',
21+
authenticate: true
1722
})<% } %>
1823
.otherwise({
1924
redirectTo: '/'

Diff for: templates/javascript/controllers/signup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ angular.module('<%= scriptAppName %>')
1414
email: $scope.user.email,
1515
password: $scope.user.password
1616
})
17-
.then( function(user) {
17+
.then( function() {
1818
// Account created, redirect to home
1919
$location.path('/');
2020
})
2121
.catch( function(err) {
22-
var err = err.data;
22+
err = err.data;
2323
$scope.errors = {};
2424

2525
// Update validity of form fields that match the mongoose errors

0 commit comments

Comments
 (0)