# ComponentFactory Class

Defined in: `js/util/ComponentFactory.js:10`
Module: util
Parent Module: StructureJS

A helper class to create multiple instances of the same Component Class from jQuery object that has one or more elements in it.

## Index

Show: Inherited Protected Private Deprecated

### Methods

- _createComponent
- create static

## Methods

### `_createComponent` () private

Defined in `js/util/ComponentFactory.js:65`

Helper method to create the component.

### `create`
(

- `$element`
- `ComponentClass`
- `[scope=null]`

)
Array. public static

Defined in `js/util/ComponentFactory.js:23`

Takes a jQuery object that has one or more elements in it and passes a single jQuery element into the constructor of the class that is also being passed in.

#### Parameters:

- `$element` JQuery

  One or more jQuery referenced DOM elements.

- `ComponentClass` Any

  The class that you want instantiated.

- `[scope=null]` DisplayObjectContainer optional

  This scope (parent object) is needed to instantiate the component/view with the use of the addChild method.

#### Returns:

Array.:

Returns a list of instantiated components/views so you can manage them within the Class that created them.

#### Example:

     ComponentFactory.create($('.js-list'), SomeClass, this);

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index