MCPcopy Create free account
hub / github.com/angular-app/angular-app / checkResourceMethod

Function checkResourceMethod

client/src/common/directives/crud/edit.js:24–28  ·  view source on GitHub ↗
(methodName)

Source from the content-addressed store, hash-verified

22 var original = angular.copy(resource);
23
24 var checkResourceMethod = function(methodName) {
25 if ( !angular.isFunction(resource[methodName]) ) {
26 throw new Error('crudEdit directive: The resource must expose the ' + methodName + '() instance method');
27 }
28 };
29 checkResourceMethod('$saveOrUpdate');
30 checkResourceMethod('$id');
31 checkResourceMethod('$remove');

Callers 1

edit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected