Camillia
asked on
How can I do this in Angular, instead of jQuery?
This works in jQuery but I wonder how I can do it in Angular.
1. I have this tag
2. jQuery code
1. I have this tag
<a ng-click="cancel()" data-bookmark={{bookmark.bookmarkkey }} id="bookmark" onClick="bookmarkClick(this)" href=""> </a>
2. jQuery code
<script>
function bookmarkClick(id)
{
var v = $(id).attr("data-bookmark"));
var bookmarkURL = v.split('#')[0]; //***** example of id --> Home?id=3#content_123
window.location.href = bookmarkURL + "#";
}
$(document).ready(...{
});
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER