class SimpleComponent {
}
var string = 'SimpleComponent';
bootstrapComponents.push(string); // This should be 'SimpleComponent' class and not a string value.
How can I pass class object from a string value in typescript?
class SimpleComponent {
}
var string = 'SimpleComponent';
bootstrapComponents.push(string); // This should be 'SimpleComponent' class and not a string value.
How can I pass class object from a string value in typescript?
As far as I know, the modular concept of angular2 isn't to store classes in arrays or objects and push them around, it is to export classes and import them elsewhere. In stead, segment you application into modules and load them via the router. Unused modules and their respective components will only load once they are needed, unless otherwise specified via lazyload.