-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-base-class.min.js
1 lines (1 loc) · 1.06 KB
/
angular-base-class.min.js
1
angular.module("BaseClass",[]).factory("BaseClass",function(){"use strict";var a=function(a,b){for(;;){if(!a)throw Error('Could not find property "'+b+'"');if(a.hasOwnProperty(b))return a;a=Object.getPrototypeOf(a)}},b=function(a){if(!angular.isUndefined(a)&&!angular.isObject(a))throw Error("arguments provided to constructor must be a key/value pair object!");angular.extend(this,a)};return b.extend=function(b){var c,d=this;return c=angular.isObject(b)&&b.hasOwnProperty("constructor")?b.constructor:function(){return d.apply(this,arguments)},c.extend=d.extend,c.prototype=Object.create(d.prototype,{constructor:{writable:!0,value:c},_super:{value:function(b,c){var d,e,f,g,h;return d="__super__"+b,e=this[d],f=Object.getPrototypeOf(e?e:a(this,b)),g=a(f,b),this[d]=g,c=c&&c.hasOwnProperty("length")?Array.prototype.slice.call(c):[c],h=g[b].apply(this,c),e?this[d]=e:delete this[d],h}}}),angular.extend(c.prototype,b),Array.isArray(b.mixins)&&b.mixins.forEach(function(a){for(var b in a)angular.isFunction(a[b])&&angular.isUndefined(c.prototype[b])&&(c.prototype[b]=a[b])}),c},b});