Get html element in Angularjs
by Mahesh Konne
HTML
<table ng-controller="myCtrl" border="1">
<tr class="x" ng-repeat="x in records">
<td>{{x.Name}}</td>
<td>{{x.Country}}</td>
</tr>
</table>
JavaScript
function myCtrl($scope) {
$scope.records = [
{
"Name" : "Alfreds Futterkiste",
"Country" : "Germany"
},
{
"Name" : "Berglunds snabbköp",
"Country" : "Sweden"
},
{
"Name" : "Centro comercial Moctezuma",
"Country" : "Mexico"
},
{
"Name" : "Ernst Handel",
"Country" : "Austria"
}];
setTimeout(function(){
var multibutton = document.getElementsByClassName("x");
debugger;
console.log(multibutton[0]);
}, 10);
}