In this code:
$scope.others=[some data...]
$scope.tab=[];
$scope.smt = function(x){
for(var i = 0; i < $scope.others; i++){
var el = angular.element(document.querySelector('#'+x));
if (el.hasClass("myClass")){
sel.push($scope.tab[i]);
}
}
}
JSHint complains about:
'document' is not defined
Add "browser" : true
to your jshint configuration or /* jshint browser: true */
at the top of your file to let jshint know that your environment is a browser. See documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With