What is the difference between ng-click and data-ng-click in angularjs?

后端 未结 4 1139
囚心锁ツ
囚心锁ツ 2020-12-29 03:01

From 1st view seems like data-ng-click can pass some data as argument to method should be invoked during pressing on button.

But I don\'t see the differ

4条回答
  •  梦谈多话
    2020-12-29 03:37

    HTML5 has an ability to embed custom data attributes on all HTML elements

    These new custom data attributes consist of two parts:

    Attribute Name The data attribute name must be at least one character long and must be prefixed with 'data-'. It should not contain any uppercase letters.

    Attribute Value The attribute value can be any string.

  • Celery
  • source : http://html5doctor.com/html5-custom-data-attributes/

提交回复
热议问题