angular2 get view not working in Internet Explorer 11

291 views
Skip to first unread message

Stephen Conard

unread,
Nov 17, 2016, 8:34:48 AM11/17/16
to Angular
There is an example application at http://www.codeproject.com/Articles/1118189/CRUD-USING-NET-CORE-ANGULARJS-WEBAPI  that functions in Chrome but async calls seem to fail in IE11. I have tried adding/removing combinations of the following

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META HTTP-EQUIV="Expires" CONTENT="-1">

<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

<script src="../lib-npm/es5-shim/es5-shim.js"></script>

<script src="../lib-npm/es5-shim/es5-sham.js"></script>

<script src="../lib-npm/es6-shim/shims_for_IE.js"></script>

<script src="../lib-npm/es6-shim/es6-shim.js"></script>


If I open development tools in Internet Explorer and change emulation to 10, the page functions as expected. (data in list updates on save) But if I change the X-UA-Compatible from edge to 10, the call still fails.


steve




Stephen Conard

unread,
Nov 17, 2016, 8:51:08 AM11/17/16
to Angular

project.json
{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",

    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.AspNetCore.Server.WebListener": "0.1.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",

    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.0"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
  },

  "commands": {
    "WebIIS": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000",
    "OutsideIIS": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Weblistener --server.urls http://localhost:5001"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    },
   
    "runtimes": {
      "osx.10.11-x64": {},
      "ubuntu.14.04-x64": {},
      "win7-x64": {}
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

package.json
{
  "version": "1.0.0",
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "angular2": "2.0.0-beta.9",
    "systemjs": "0.19.24",
    "es6-shim": "^0.33.3",
    "rxjs": "5.0.0-beta.2"
  },
  "devDependencies": {
    "gulp": "3.8.11",
    "gulp-concat": "2.5.2",
    "gulp-cssmin": "0.1.7",
    "gulp-uglify": "1.2.0",
    "rimraf": "2.2.8"
  }
}

Sander Elias

unread,
Nov 18, 2016, 11:37:44 PM11/18/16
to Angular
Hi Steve,

But if I change the X-UA-Compatible from edge to 10
Don't do that! If you need to test on IE10 or IE11 just use that browser. Forcing edge in IE mode has some strange side-effects...

Regards
Sander 

Stephen Conard

unread,
Nov 21, 2016, 7:10:01 AM11/21/16
to Angular
The matter is not testing the matter is failure in IE no matter what <meta http-equiv="X-UA-Compatible" content="IE=EDGE" /> is set at. It can be 10, 11 or edge and it still fails.


The original post details that f12 will allow page to function in emulation mode just as indication of behavior (and only scenario I can produce success in IE).

steve
Reply all
Reply to author
Forward
0 new messages