0

I am taking baby steps with AngularJS. I am a bit confused about requiring a webserver to run an AngularJS sample or demo. The reason is for study purpose I have downloaded running examples and demos, but not having any luck with it. A very simple demo of displaying a name is not working for me. Do I have to do anything specific to get a simple app running. I feel very weird asking my doubt requing a webserver as AngularJS is a client side Framework. Nevertheless, hoping someone can throw some light on this. Thanks in adavnce.

4

2 回答 2

0

如果您使用 Firefox,那么您不需要任何服务器来运行您的基本应用程序。如果您使用 Chrome,那么出于安全原因,它不喜欢对库进行文件访问。图书馆必须以另一种方式提供服务。因此,您可以通过使用 Firefox 打开经典的 index.html 来让 hello-world AngularJS 工作,这样您就不必启动任何 Web 服务器。

这是一个示例应用程序,在 README 中有解释:

https://github.com/davidb583/white-angularjs-app

于 2013-08-29T10:47:50.273 回答
-1

实际上,您不需要网络服务器来运行 AngularJS 应用程序,因为它是客户端框架。

于 2013-08-28T21:20:43.013 回答