a (directive)

Improve this Doc View Source a

  1. directive in module ng

Modifies the default behavior of the html A tag so that the default action is prevented when the href attribute is empty.

This change permits the easy creation of action links with the ngClick directive without changing the location or causing page reloads, e.g.: <a href="angular1_2-api-ng-directive-" ng-click="list-addItem().html?lang=en">Add Item</a>

Directive Info

  • This directive executes at priority level 0.

Usage

  • as element:
    <a>
    ...
    </a>

© 2010–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/directive/a

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部