如何在不重新加载页面的情况下刷新内容?

时间:2013-01-30 12:28:26

标签: javascript angularjs

我必须刷新页面内容而不用javascript重新加载页面。 这不起作用。

window.location.assign("#/invoice/" + $scope.invoiceId);

1 个答案:

答案 0 :(得分:0)

使用AJAX。 jQuery为它提供了一个很好的包装器。

http://jQuery.com/

此示例将ajax / test.html加载到#content div:

$.get('ajax/test.html', function(data) {
     $("#content").html(data);
});
相关问题