A "little component" is a Fluid module with a collection of merged options; options that are provided by both the user and the component's defaults. It is a convenience method for creating small objects that have options but don't require full View-like features such as the DOM Binder or events.
||(Object) The component name|
||(Object) The component options|
|Object||A module with merged options|
We want to create an HTML5 Uploader little component containing sub-components to locally add files to the file queue and to remotely send files to a server. The HTML5 little component can be instantiated in two different ways. See the following examples below:
A direct call to the framework API:
Indirect IoC-driven approach:
A component grade is required by setting the gradeNames property to "fluid.littleComponent". The "autoInit" grade is included so that the component's actual creator function doesn't need to be written at all.