Skip to content

Commit

Permalink
feat(controller): use "controller as vm" syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
meriadec committed Oct 6, 2014
1 parent 8faed06 commit ff41227
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion route/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ angular.module('<%= _.camelize(appname) %>')
.when('<%= route %>', {
templateUrl: 'views/<%= _.slugify(name) %>/<%= _.slugify(name) %>.html',
controller: '<%= _.capitalize(_.camelize(name)) %>Ctrl',
controllerAs: '<%= _.camelize(name) %>'
controllerAs: 'vm'
});
});
2 changes: 1 addition & 1 deletion route/templates/view.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div>
controller {{ <%= _.camelize(name) %>.name }} ready !
controller {{ vm.name }} ready !
</div>

0 comments on commit ff41227

Please sign in to comment.