• import { Factory } from ‘ angular-ecmascript/module-helpers ‘ ; class MomentFactory extends Factory { static $name = ‘ now ‘ create () { return new Date ().
  • Note that the filter method must be implemented, otherwise an error will be thrown during load time.
  • import { Decorator } from ‘ angular-ecmascript/module-helpers ‘ ; class MyDecorator extends Decorator { static $name = ‘ myService ‘ helperFn () { // an additional fn to add to the service } decorate () { this .
  • import { Config } from ‘ angular-ecmascript/module-helpers ‘ ; class RoutesCfg extends Config { static $inject = [ ‘ $routeProvider ‘ ] constructor ( …
  • import { Runner } from ‘ angular-meteor/module-helpers ‘ ; class RoutesRunner extends Runner { static $inject = [ ‘ $rootScope ‘ , ‘ $state ‘ ] run () { this .

Read more


SoyPabloSuarez

@SoyPabloSuarez: “`Build an AngularJS app using ES6's class system` =>” open tweet »