Ngclick is deprecated. A popular alternative or solution?

I am new to angular. ng-click seems like a pretty basic directive, I don’t understand how you can make an application without ng-click. Am I missing something? Apparently this is deprecated. And the docs point me to fastclick, but this is not an angular implementation.

Is there a popular non-obsolete way to do what ng-click did? For this, I could not find popular chat packages. Thanks.

+5
source share
1 answer

ng-click only becomes obsolete in ngTouch due to delays when used in mobile browsers.

Starting with Angular 1.5, this directive is deprecated and disabled by default. The directive will not receive any additional support and may be removed from future releases. If you need a directive, you can enable it using the $ touchProvider # ngClickOverrideEnabled function . We also recommend switching to FastClick . To learn more about the 300 ms delay, this Telerik article gives a good overview.

The regular ngClick in the main ng module will remain unaffected.

If you need to use fastclick as an alternative, there are a couple of Angular wrapped versions. One , Two .

+10
source

All Articles