refactored scaffold generator into ng-resource generator