instantiate(Type, [locals]);
Create a new instance of JS type. The method takes a constructor function, invokes the new operator, and supplies all of the arguments to the constructor function as specified by the constructor annotation.
Parameters
Param Type Details Type Function Annotated constructor function. locals (optional) Object Optional object. If preset then any argument names are read from this object first, before the $injector is consulted.
Returns
Object
new instanc