Replies: 1 comment 3 replies
-
There are a couple of paths forward for you here. One would be creating a component at the form level in Angular that could be reused throughout your application. This could be built in a way such that it can handle/abstract this behavior. In theory, you could also create a custom directive that you could then add to existing forms without the need for a separate component abstraction. Another option would be to create a custom Angular component with the button. This could wrap (or extend) the existing component and you could trigger the behavior you want at the button level. This would still require a change to your forms because that behavior would have to be initiated from somewhere. All in all, I think a custom directive that you can add to your form tags is probably the most straightforward option. |
Beta Was this translation helpful? Give feedback.
-
The old clr angular buttons had a briefly check mark shown when set to
ClrLoadingState.SUCCESS
. The newcds-button
are stateless and I was wondering which way is the best way to extendcds-button
so that it will behave like the old angular buttons do.So far I've come up with:
But I would have to add it to every
submit()
method in my application. Is it possible to extendcds-button
with this behavior? I've been looking at Angular directives but I must say I'm not sure it's the best way or if at all possible to extend Clarity Core components this way.Beta Was this translation helpful? Give feedback.
All reactions