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