mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[Framework] Add spec for partial constructor
Add spec for partial constructor, used to handle two-stage application of Angular dependencies and constructor arguments. WTD-518.
This commit is contained in:
@ -31,14 +31,13 @@ define(
|
||||
|
||||
return function () { // Bind everything else
|
||||
var other = Array.prototype.slice.call(arguments),
|
||||
instance = {};
|
||||
instance = Object.create(Constructor.prototype);
|
||||
|
||||
// Mimic "new" behavior with apply.
|
||||
instance = Constructor.apply(
|
||||
instance,
|
||||
dependencies.concat(other)
|
||||
) || instance;
|
||||
instance.prototype = Constructor.prototype;
|
||||
|
||||
return instance;
|
||||
};
|
||||
|
Reference in New Issue
Block a user