在部署IIS应用程序的角度 [英] Deploy angular application on IIS

查看:259
本文介绍了在部署IIS应用程序的角度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作与node.js中AngularJs应用使用一饮而尽,我已经创建(编译)我的应用程序(应用在下面的图像),并得到了以下目录

I am working on AngularJs application with node.js. Using gulp, I have created (compiled) my application (app in below image) and got the following directories

在这里输入的形象描述

现在我彻底打接下来该怎么继续。我想举办这个应用程序在IIS运行,看到的页面(在的意见文件夹中),但我不知道如何来承载它IIS。

Now I completely struck how to proceed next. I want to host this application over IIS to run and see the pages (in views folder) but I don't know how to host it on IIS.

我试过<一个href=\"http://www.infragistics.com/community/blogs/dhananjay_kumar/archive/2015/02/13/how-to-use-nodejs-ex$p$pss-and-bower-to-create-angularjs-apps.aspx\"相对=nofollow>这个文章,但它指导使用前preSS服务器。

I tried this article, but it guides to use express server.

问题是,IIS将如何弄清楚,第一页就在于的意见文件夹,即使我用的是完整的URL

The issue is, how IIS will figure out that the first page lies in views folder, and even if I use the complete url

http://localhost:8078/views/index.html

它为我所有的角code括号像 {{} logginuser}

编辑:
我需要web.config文件在这里与否。如果是的话那么我是如何将定义入口点的应用程序?

Do I need web.config file here or not. If yes then how I will define entry point to the application?

推荐答案

只是要在IIS中配置一个网站下的Web应用程序并创建自定义的web.config。

Just have to configure a Web Application under a website in IIS and create a custom web.config.


  1. 在IIS中,转到默认Web站点,右键单击并选择添加Web应用程序

  2. 设置别名是AngularApp和物理路径是你的根目录

  3. 在目录的根目录添加web.config文件具有以下code

    &LT; XML版本=1.0编码=UTF-8&GT?;
    &LT;结构&gt;
      &LT; system.webServer&GT;
        &LT; defaultDocument&GT;
            &LT;&文件GT;
                &LT;增加价值=查看/ index.html的/&GT;
            &LT; /文件&GT;
        &LT; / defaultDocument&GT;
      &LT; /system.webServer>
    &LT; /结构&gt;

浏览到您的新的角度应用程序通过将的http://本地主机/ AngularApp (假设在HTTP绑定IIS)。

Browse to your new Angular application by going to http://localhost/AngularApp (assuming http binding in IIS).

这篇关于在部署IIS应用程序的角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆