registerMaterialFormComponent function

void registerMaterialFormComponent ()

registration-Helper

Implementation

void registerMaterialFormComponent() {
    final MdlConfig config = new MdlWidgetConfig<MaterialFormComponent>(
        _MaterialFormComponentConstant.WIDGET_SELECTOR,
            (final dom.HtmlElement element,final ioc.Container iocContainer)
                => new MaterialFormComponent.fromElement(element,iocContainer)
    );

    // If you want <mdl-form></mdl-form> set selectorType to SelectorType.TAG.
    // If you want <div mdl-form></div> set selectorType to SelectorType.ATTRIBUTE.
    // By default it's used as a class name. (<div class="mdl-form"></div>)
    config.selectorType = SelectorType.CLASS;

    // With priority PRE_WIDGET we make sure that all children are registered before this components gets initialized
    config.priority = RegistrationPriority.POST_WIDGET;

    componentHandler().register(config);
}