angular-inherits
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -43,3 +43,3 @@ /** | ||
* @param {Function} superClass The super class function constructor (the class that is BEING EXTENDED) | ||
* @param {Object|undefined} proto Object data to add onto the child class' prototype | ||
* @param {Object|Array|undefined} proto Object data to add onto the child class' prototype OR array of services to $inject | ||
* @return {void} | ||
@@ -49,2 +49,12 @@ */ | ||
// optionally, the third argument can be an array of services to inject | ||
var $inject; | ||
if (arguments.length === 4) { | ||
proto = arguments[3]; | ||
$inject = arguments[2]; | ||
} else if (proto instanceof Array) { | ||
$inject = proto; | ||
proto = undefined; | ||
} | ||
if (!proto) { | ||
@@ -80,2 +90,6 @@ | ||
} | ||
if ($inject) { | ||
childClass.$inject = $inject; | ||
} | ||
}; |
{ | ||
"name": "angular-inherits", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Classical Prototypal Inheritence For AngularJS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
1829666
7267