Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Another nice feature of angular is that templates are promise-aware. So the following controller is equivalent for most purposes:

    function thingCtrl($scope, Thing) {
      $scope.things = Thing.all()
    }
    thingCtrl.$inject = ['$scope', 'Thing'];


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: