简单的angularjs应用程序运行IIS

时间:2017-09-21 06:12:42

标签: angularjs npm angular-ui-router web-config iis-7.5

我正在创建简单的angularjs Web应用程序,但我想在IIS中部署我的Web应用程序,它无法正常工作我正在搜索3到3小时但没有成功。
如何在IIS上使用此项目。如果你需要其他任何理解,我在这里。我分享了两张图片供您理解我的问题

if you want to test yourself run this project i edit this project as my requirement.when its run on IIS, please share with me, how to run. i really appreciate. 

https://github.com/ranjithprabhuk/Angular-Bootstrap-Dashboard

README.md

## npm install -g http-server
go to project the main folder where index.html exists and run the command

## http-server
run application

app.js

 var app = angular.module('app', ['ui.router', 'ui.bootstrap', 'flash',
        //main modules
        'login', 'dashboard','staffregistration']);


    app.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', function ($stateProvider, $locationProvider, $urlRouterProvider, $modalInstance) {

        //IdleScreenList
        $stateProvider
           .state('app', {
               url: '/app',
               templateUrl: 'app/common/app.html',
               controller: 'appCtrl',
               controllerAs: 'vm',
               data: {
                   pageTitle: 'Login'
               }
           });

        $urlRouterProvider.otherwise('login');

        //$urlRouterProvider.otherwise('app/dashboard');
        //$urlRouterProvider.otherwise('/app/dashboard');
    }]);

    // set global configuration of application and it can be accessed by injecting appSettings in any modules
    app.constant('appSettings', appConfig);

Webconfig

  <configuration>
     <system.webServer>
        <defaultDocument>
          <files>
            <clear />
            <add value="index.html" />
          </files>
        </defaultDocument>
    </system.webServer>
    </configuration>

Image1

Image Errors

0 个答案:

没有答案