I have a simple button where I call an ng-click (which works fine) and I would like to call a jQuery click on that same button to trigger some jQuery while doing some angular stuff.
Here's my button
<button type="button" class="btn btn-md updateUser" ng-click="openFormForUpdate(client.id)">{{ __ "Update" }}</button>
Here's the code that is supposed to be triggered but that console.log() is not showing anything.
var hidden = true;
$('.updateUser').click(function(){
console.log('Form is now open or closed.');
hidden = !hidden;
if(hidden === false)
$('.add-user').show(1000);
else
$('.add-user').hide(1000);
});
I'm open to all kind of solution!
ng-show
with ahidden
flag onclient
should do it. – Kevin B Apr 16 at 19:11