Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($aria): pass $event in locals for ngClick #10477

Closed
wants to merge 1 commit into from

Conversation

PatrickJS
Copy link
Member

pass event in locals for $eval
This happens in angular-bootstrap's repo for modals

ng-click="close($event)"
angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
  $templateCache.put("template/modal/window.html",
    "<div tabindex=\"-1\" role=\"dialog\" class=\"modal fade\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\" ng-click=\"close($event)\">\n" +
    "    <div class=\"modal-dialog\" ng-class=\"{'modal-sm': size == 'sm', 'modal-lg': size == 'lg'}\"><div class=\"modal-content\" modal-transclude></div></div>\n" +
    "</div>");
}]);

pass <code>event</code> in <code>locals</code> for <code>$eval</code>
This happens in <code>angular-bootstrap</code>'s repo for modals
```javascript
ng-click="close($event)"
```

```javascript
angular.module("template/modal/window.html", []).run(["$templateCache", function($templateCache) {
  $templateCache.put("template/modal/window.html",
    "<div tabindex=\"-1\" role=\"dialog\" class=\"modal fade\" ng-class=\"{in: animate}\" ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\" ng-click=\"close($event)\">\n" +
    "    <div class=\"modal-dialog\" ng-class=\"{'modal-sm': size == 'sm', 'modal-lg': size == 'lg'}\"><div class=\"modal-content\" modal-transclude></div></div>\n" +
    "</div>");
}]);
```
@googlebot
Copy link

CLAs look good, thanks!

@caitp
Copy link
Contributor

caitp commented Dec 16, 2014

This is a dupe of #10443 which fixes a few other issues with the click directive as well --- we'll get these in for next week

@PatrickJS PatrickJS closed this Dec 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants