Add support for namespacing and subcomponents through prototype in compo... - #485
Add support for namespacing and subcomponents through prototype in compo...#485cjblomqvist wants to merge 1 commit into
Conversation
|
Adds the possibility to add a subcomponents on your Component prototype - i.e. without access to app. E.g. // When this component is loaded through app.component('./mycomponent/index.js'), the subcomponent will automatically be loaded namespaced to the maincomponents name (and possible namespace), i.e. you will have two components loaded (from below component): MyComponent.prototype.name = 'maincomponent' Also adds automatic namespacing when loading components. Basically, this facilitates loading subcomponents without access to app, which furthermore makes it possible to allow for better separation of concerns and encapsulation when having a hierarchy of components. PS. This is just a first step towards some simple use cases and can most definitely be built out further to better support all kinds of cases and situations. |
...nents load