This will handle the knockout component registration
Parameters:
| Name | Type | Description |
|---|---|---|
components |
Array | Array of objects containing the component name as and the template name |
customComponentsDirectory |
String | If the location is not on app/components, provide a custom directory |
- Source:
Returns:
- Type
- None
Examples
Normal usage
var my_array_of_components = [{
name: 'my-component',
dir: 'my-component/my-component'
}];
//adds it to the registered knockout components
registerComponents(my_array_of_components);
Template only usage
var my_array_of_components = [ {
name: 'about-page',
dir: 'about-page/about.html',
templateOnly: true
}];
//adds it to the registered knockout components
registerComponents(my_array_of_components);
Requires
- module:knockout