Skip to content

Commit

Permalink
fix(client:navbar.controller): refactor EJS, exclude constructor if e…
Browse files Browse the repository at this point in the history
…mpty
  • Loading branch information
Awk34 committed May 2, 2016
1 parent a24643a commit a75b1d4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions templates/app/client/components/navbar/navbar.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ class NavbarController {

isCollapsed = true;
//end-non-standard
<%_ if(filters.ngroute || filters.auth) { _%>

constructor(<% if(!filters.uirouter) { %>$location<% } if(!filters.uirouter && filters.auth) { %>, <% } if (filters.auth) { %>Auth<% } %>) {<% if(!filters.uirouter) { %>
this.$location = $location;<% } %>
<% if (filters.auth) { %>this.isLoggedIn = Auth.isLoggedIn;
constructor(<% if(!filters.uirouter) { %>$location<% } if(!filters.uirouter && filters.auth) { %>, <% } if (filters.auth) { %>Auth<% } %>) {
<%_ if(!filters.uirouter) { _%>
this.$location = $location;
<%_ } _%>
<%_ if (filters.auth) { _%>
this.isLoggedIn = Auth.isLoggedIn;
this.isAdmin = Auth.isAdmin;
this.getCurrentUser = Auth.getCurrentUser;
<% } %>}<% if(!filters.uirouter) { %>
<%_ } _%>
}<% } %>
<%_ if(!filters.uirouter) { _%>

isActive(route) {
return route === this.$location.path();
Expand Down

0 comments on commit a75b1d4

Please sign in to comment.