Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

CoffeeScript Classes with Angular and ng-classify

$
0
0
- ng-classify - https://github.com/CaryLandholt/ng-classify
- gulp - https://github.com/CaryLandholt/gulp-ng-classify
- grunt - https://github.com/CaryLandholt/grunt-ng-classify
- atom - https://github.com/CaryLandholt/atom-ng-classify

Watch the screencast <https://www.youtube.com/watch?v=28gUTu9vnB4>!

Example:

class Home extends Controller
constructor: (userService) ->
@save = (username) ->
userService.addUser username

equivalent to:

angular.module('app').controller('homeController', ['userService', function Home (userService) {
this.save = function (username) {
return userService.addUser(username);
};}]);

Viewing all articles
Browse latest Browse all 6551

Trending Articles