Developer Programs

Learn

Docs

Angular Directives for User Interaction

Technical Info > Framework Considerations: Angular > Angular Directives for User Interaction

Begin by importing the JhaResponsiveCoreModule into your application.

Import the JhaResponsiveCoreModule module
// import into app.module
import { JhaResponsiveCoreModule } from '@jkhy/responsive-ui-angular/jha-responsive-core';

@NgModule({
    imports: [
        ...
        JhaResponsiveCoreModule.forRoot(),
        ...
    ]
})

export class AppModule(){}

jhaThrottleClick

Add the jhaThrottleClick directive to any clickable element. This directive throttles the typical click event to prevent double clicks. When using the jhaThrottleClick directive, bind your method to jhaThrottledClick instead of click or jhaClick. There is one optional attribute of jhaThrottleTime, which sets the delay in milliseconds and is defaulted to 500.

Using the jhaThrottleClick directive
<input id="GrossIncome" name="GrossIncome" type="number" step="0.01" jhaCurrencyInput
    class="form-control" [(ngModel)]="customerInfo.grossIncome" autocomplete="off"
    autocorrect="off" autocapitalize="off" spellcheck="false" />

Support options
Have questions on this topic?
Join the Responsive UI team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.
Last updated Tue Jun 6 2023