Skip to content

Commit

Permalink
Fixes googlearchive#13 - angularfire:route does not add controller or…
Browse files Browse the repository at this point in the history
… view

Fixes googlearchive#14 - auth required option does not seem to work
  • Loading branch information
katowulf committed Dec 19, 2014
1 parent a5307b5 commit 6498ec4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions route/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var Generator = module.exports = function Generator(name, skipFiles) {
this.foundWhenForRoute = true;
}

if( !skipFiles ) {
if( skipFiles !== true ) {
this.hookFor('angularfire:controller');
this.hookFor('angularfire:view');
}
Expand Down Expand Up @@ -67,7 +67,9 @@ Generator.prototype.rewriteAppJs = function () {
]
};

var whenMethod = this.env.options.authRequired? 'whenAuthenticated' : 'when';

var whenMethod = this.env.options.authRequired || this.options['auth-required']? 'whenAuthenticated' : 'when';
console.log(whenMethod, this.options);

if (coffee) {
config.splicable.unshift("." + whenMethod + " '/" + this.uri + "',");
Expand Down

0 comments on commit 6498ec4

Please sign in to comment.