Link to home
Start Free TrialLog in
Avatar of joyacv2
joyacv2Flag for Puerto Rico

asked on

angular js and jquery integration

Hi,

I have the following part of a code, its work, but when i click a td, i have an angular expression {{car1}} that don't change, what i can do?
 //document ready
          angular.element(document).ready(function () {

              $("td").each(function(){$(this).attr('pr1',parseFloat($(this).html().replace("$","")))});

             $("td").click(function(){
                 $scope.car1 = $scope.car1 + parseFloat($(this).attr('pr1'));
                 alert($scope.car1);
             });


          })
          //fin del document ready

Open in new window

Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Apologies - just re-read the question - do you have a page online we can look at?
Avatar of joyacv2

ASKER

sorry, no
Avatar of joyacv2

ASKER

i can change using an id and jquery.html() function, but i want to use angular because is more simple and have a currency filter for expressions
Ok but with only that snippet of code - sort of like bringing the spare tyre of car into the shop and asking why it won't start.
Avatar of joyacv2

ASKER

ok,

how i update an <span>{{tdclicked}}</span> or any other tag, when i click a 'td' using angular js expressions?
 i want that when i click a td, then the span tag takes its value + the previous value
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial