I am trying to pass an angular variable into a function click call. this is what im trying to do so far:
<button onclick="dialogBox(id)">Cancel</button>
$scope.dialogBox = function (id) {
console.log('Succesfully submitted id: '+id);
});
ng-clickinstead ofonclick. Make sure that thedialogBoxfunction is available to the scope that the button is on (typically inside a controller or directive). Also, what's theidvariable? with the given code, id isn't defined.