Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular-formly with Font awesome

I want to know if it is possible to use an Font Awesome icon with Angular-formly. I am using Angular-formly with bootstrap and now i wat to add Font Awesome icon to the right of the field.
This is how my Angular-formly is setup

            field = {
                className: 'col-md-3',
                key: name,
                type: typeObject.type,
                templateOptions: {
                    "valueProp": "name",
                    disabled: typeObject.disabled,
                    type: 'text',
                    label: name,
                    required: true,
                    options: typeObject.options,
                    fieldData: value,
                    addonRight: {text:"Font Awesome icon here"}
                }
            };

So is this possible to achieve?

like image 517
Samuel Avatar asked May 25 '26 08:05

Samuel


1 Answers

Yes, it's totally possible and there's already an example for it. Just replace the bootstrap classes with font awesome classes and you're good to go.

like image 80
kentcdodds Avatar answered May 26 '26 20:05

kentcdodds