Skip to content

Commit 31a840b

Browse files
committed
Merge branch 'master' of github.com:DaftMonk/generator-angular-fullstack
2 parents 8675a00 + 96907e3 commit 31a840b

File tree

7 files changed

+26
-13
lines changed

7 files changed

+26
-13
lines changed

app/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
4242
default: true,
4343
}], function (answers) {
4444
this.skipConfig = answers.skipConfig;
45+
46+
// NOTE: temp(?) fix for #403
47+
if(typeof this.oauth==='undefined') {
48+
var strategies = Object.keys(this.filters).filter(function(key) {
49+
return key.match(/Auth$/) && key;
50+
});
51+
52+
if(strategies.length) this.config.set('oauth', true);
53+
}
54+
4555
cb();
4656
}.bind(this));
4757
} else {

app/templates/.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: node_js
22
node_js:
3-
- '0.8'
43
- '0.10'
4+
- '0.11'
55
before_script:
6-
- 'npm install -g bower grunt-cli'
7-
- 'bower install'
6+
- npm install -g bower grunt-cli<% if (filters.sass) { %>
7+
- gem install sass<% } %>
8+
- bower install
89
services: mongodb

app/templates/_package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"grunt-nodemon": "~0.2.0",
5757
"grunt-angular-templates": "^0.5.4",
5858
"grunt-dom-munger": "^3.4.0",
59-
"grunt-protractor-runner": "^0.2.4",
59+
"grunt-protractor-runner": "^1.1.0",
6060
"grunt-asset-injector": "^0.1.0",
6161
"grunt-karma": "~0.8.2",
6262
"grunt-mocha-test": "~0.10.2",<% if(filters.sass) { %>

app/templates/client/app/account(auth)/login/login(html).html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,23 @@ <h1>Login</h1>
1313
<div class="form-group">
1414
<label>Email</label>
1515

16-
<input type="text" name="email" class="form-control" ng-model="user.email">
16+
<input type="email" name="email" class="form-control" ng-model="user.email" required>
1717
</div>
1818

1919
<div class="form-group">
2020
<label>Password</label>
2121

22-
<input type="password" name="password" class="form-control" ng-model="user.password">
22+
<input type="password" name="password" class="form-control" ng-model="user.password" required>
2323
</div>
2424

2525
<div class="form-group has-error">
2626
<p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && submitted">
2727
Please enter your email and password.
2828
</p>
29+
<p class="help-block" ng-show="form.email.$error.email && submitted">
30+
Please enter a valid email.
31+
</p>
32+
2933
<p class="help-block">{{ errors.other }}</p>
3034
</div>
3135

app/templates/client/app/admin(auth)/admin.controller(coffee).coffee

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
angular.module '<%= scriptAppName %>'
44
.controller 'AdminCtrl', ($scope, $http, Auth, User) ->
55

6-
$http.get '/api/users'
7-
.success (users) ->
8-
$scope.users = users
6+
# Use the User $resource to fetch all users
7+
$scope.users = User.query()
98

109
$scope.delete = (user) ->
1110
User.remove id: user._id

app/templates/client/app/admin(auth)/admin.controller(js).js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
angular.module('<%= scriptAppName %>')
44
.controller('AdminCtrl', function ($scope, $http, Auth, User) {
55

6-
$http.get('/api/users').success(function(users) {
7-
$scope.users = users;
8-
});
6+
// Use the User $resource to fetch all users
7+
$scope.users = User.query();
98

109
$scope.delete = function(user) {
1110
User.remove({ id: user._id });

test/fixtures/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"grunt-nodemon": "~0.2.0",
5757
"grunt-angular-templates": "^0.5.4",
5858
"grunt-dom-munger": "^3.4.0",
59-
"grunt-protractor-runner": "^0.2.4",
59+
"grunt-protractor-runner": "^1.1.0",
6060
"grunt-asset-injector": "^0.1.0",
6161
"grunt-karma": "~0.8.2",
6262
"grunt-mocha-test": "~0.10.2",

0 commit comments

Comments
 (0)