Angular Reactive Forms Support
HI
- I'm trying to use Reactive Forms in angular with ui5-input control this way
<ui5-input formControlName="userName"></ui5-input>
But I receive an exception

However, if I use a normal input with html works perfectly. Is it possible that I need to import some extra module?
-
How can I use the two way data binding? I Install the package and imported OrigamiFormsModule but it doesn't work. Maybe I'm making a mistake.
-
Finally How Can I apply the style sap-ui-compactSize in angular's project.
Thanks for your help.
Hello @urielrodriguezusma
We are currently working on improving the two way databinding of the components. Follow: https://github.com/SAP/ui5-webcomponents/issues/651
Currently you can add a ngDefaultControl attribute to the ui5-input and it will enable you to use it for two way databinding. Please give a try to that solution for your points 1 and 2
- You can change the compact setting using the configuration script placed in your index.html
<script data-id='sap-ui-config' type="application/json">
{
"compactSize": true
}
</script>
IMPORTANT: The configuration script attribute will be changed in the next release
~~data-id='sap-ui-config'~~ => data-ui5-config
<script data-ui5-config type="application/json">
{
"compactSize": true
}
</script>
Please check the proposed solution and if they work we can duplicate this and follow https://github.com/SAP/ui5-webcomponents/issues/651
Hi @urielrodriguezusma,
About Reactive forms support: #706 is in master now and will be available in the next release.
I am closing the issue as all your questions have been answered. In future when you have a couple of problems, please open separate issues for each problem that you have 😊
Best regards, Filip