Appearance
Angular
typescript
import { Component } from '@angular/core';
import { IntentClickDirective } from 'intent-click/angular';
@Component({
selector: 'app-delete-button',
standalone: true,
imports: [IntentClickDirective],
template: `
<button
[intentClickCallback]="handleClick"
[intentClickOptions]="{ threshold: 'auto' }"
>
Delete Account
</button>
`,
})
export class DeleteButtonComponent {
handleClick = (event: PointerEvent) => {
console.log('Intent click at', event.clientX, event.clientY);
};
}Options
Same as React. See React documentation.
Important Notes
Input Changes
Options are read once in ngOnInit. Changing intentClickOptions input after initialization does not recreate the store in v1.