Knockoutjs allows registering components as viewmodel/template pairs. A viewmodel can be specified as a constructor function, createViewModel factory function, or AMD module. A template can be an element ID, existing element, string of markup, or array of DOM nodes. The component binding injects the component template and binds the viewmodel. Components go through a lifecycle of loading, initialization, activation, and disposal. Custom elements provide an alternative syntax to the component binding for defining component tags.