在 AngularUS $http URL 中启用哈希爆炸



>我正在尝试访问 AngularJS 中的 URL 作为

$http.get("http://localhost:8080/#/notebook/2CG2BVYJ1")      
          .then(function(response){ vm.getgraph = response.data; });

为此,发送的 get 请求仅 http://localhost:8080/。我认为 $http.get 忽略了 URL 中"#"之后的任何内容。如何让它访问完整的网址?

如果

这是来自同一个应用程序,我会建议你可以像这样使用更直接的方式

$http({
method: 'GET',
url: '/notebook/2CG2BVYJ1'
}).then(function(response){ vm.getgraph = response.data; });

我希望这有帮助

最新更新