Add more angular1 selectors
This commit is contained in:
parent
ec08a19e7d
commit
957d5b3f02
@ -42,7 +42,7 @@ Group = enum.Enum('Group', ['all', 'links', 'images', 'url', 'inputs'])
|
||||
SELECTORS = {
|
||||
Group.all: ('a, area, textarea, select, input:not([type=hidden]), button, '
|
||||
'frame, iframe, link, [onclick], [onmousedown], [role=link], '
|
||||
'[role=option], [role=button], img, [ng-click]'),
|
||||
'[role=option], [role=button], img, [ng-click], [ngClick], [data-ng-click], [x-ng-click]'),
|
||||
Group.links: 'a[href], area[href], link[href], [role=link][href]',
|
||||
Group.images: 'img',
|
||||
Group.url: '[src], [href]',
|
||||
|
@ -6,18 +6,14 @@
|
||||
<body ng-app="myApp">
|
||||
|
||||
<div ng-controller="myCtrl">
|
||||
<p>Click the button to run a function:</p>
|
||||
<p id="link" ng-click="myFunc()">OK</p>
|
||||
<p>The button has been clicked {{count}} times.</p>
|
||||
</div>
|
||||
|
||||
<script src="../angular1/angular.min.js"></script>
|
||||
<script>
|
||||
angular.module('myApp', [])
|
||||
.controller('myCtrl', ['$scope', function($scope) {
|
||||
$scope.count = 0;
|
||||
$scope.myFunc = function() {
|
||||
$scope.count++;
|
||||
window.location = "/data/hello.txt";
|
||||
};
|
||||
}]);
|
||||
|
Loading…
Reference in New Issue
Block a user