0

I installed Angular CLI 1.0.1 successfully.

After I run ng server and go http://localhost:4200 using IE 11, it always showing "loading..." instead of "app works!"

ng-v
@angular/cli: 1.0.1
node: 6.10.2
os: win32 x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.0.3
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

Anyone know what am I missing from the install or config? the angular cli installed successfully. I follow the

npm install -g @angular/cli
ng new myproject
cd myproject
ng serve

Open http://localhost:4200 and always show "Loading... "

2 Answers 2

1

You must have javascrip errors. Make sure you open your browser javascript console and look for errors. This might be related to partialy installed npm packages. Try installing by running : npm install from a console in your project folder. For your setting, please edit your package.json file and use @angular/http version 4.1.0 and npm install again

Sign up to request clarification or add additional context in comments.

8 Comments

You are right, here is the error I got SCRIPT5007: Unable to get property 'apply' of undefined or null reference vendor.bundle.js (27377,5), what I need to do? reinstall npm?
Try to npm install again.
after reinstall npm, same problem
You do not need to re install npm or node. Go to folder where your project is and run command on a console : npm install
Same thing, I got warn when install: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0, npm warning notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform from [email protected]:; npm warn @angular/[email protected] requires a peer of @anguar/[email protected] but none was installed; npm warn @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
|
0

That is knowing Angular 2 not working in IE 9 - 11 issue, please see https://weblogs.asp.net/lduveau/angular-not-working-in-ie11 and Angular2 IE11 Unable to get property 'apply' of undefined or null reference After I install:

npm i mdn-polyfills --save

and modify the file under the project src\polyfills.ts, add following code

import "core-js/client/shim"; // or load it before other angular2 & zone.js stuff
import "zone.js";
import "reflect-metadata";

Wow, it is works!!!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.