thedillonb/rails-angularjs-simple-forum

[AngularJS] How to integrate angular and jquery with each other ?

mahtabpirzadi opened this issue · 0 comments

How to pass an angularjs variable value (value.ProductDescription) to Jquery element (spec) ?

$(".newsblock3 .id").each(function(e,val){
var idPro = $(this).text();
var spec = $(val).closest("a").find("div#desc").text();
$.each($scope.Products, function(index, value) {
if (idPro == $scope.Products[index].PKEY) {
spec = value.ProductDescription;
return false;
}
});
});