I have to refresh the contents of page without reloading the page in javascript. This is not working.
window.location.assign("#/invoice/" + $scope.invoiceId);
Use AJAX. jQuery provides a nice wrapper for that.
This example loads ajax/test.html into you #content div:
$.get('ajax/test.html', function(data) {
$("#content").html(data);
});