我想声明URL实际上会在某种情况下更新。
当我记录$ location时,会打印出来:
Location{replace: function () { ... }, assign: function () { ... }, ancestorOrigins: DOMStringList{0: 'http://localhost:9876', length: 1}, origin: 'http://localhost:9876', hash: '', search: '', pathname: '/context.html', port: '9876', hostname: 'localhost', host: 'localhost:9876', protocol: 'http:', href: 'http://localhost:9876/context.html', reload: function reload() { ... }}