我试图运行angularjs 2应用程序dist文件作为简单的html页面。即我只需双击dist文件夹中的index.html即可。但是,应用程序无法正常工作:错误:angularjs 2:SecurityError:无法执行
EXCEPTION: Uncaught (in promise): SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL 'file:///D:/' cannot be created in a document with origin 'null' and URL 'file:///D:/dev/ProxyVoting/ngapp/dist/index.html'.
你不能只是点击index.html,然后,除了它的工作。您的页面需要一些强制性文件,如果不使用服务器(Apache,node.js,...)则无法访问。 – mickdev
@mickdev你可以描述页面需要什么类型的文件吗?谢谢。 –
有关Angular 2 App生产的更多详细信息,请参阅此处:http://stackoverflow.com/a/38765929/7447071 – mickdev