1

{
  "name": "angular-hello-world",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.0.0",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.1",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.2.7",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/language-service": "^4.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  },
  "description": "This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.7.",
  "main": "karma.conf.js",
  "keywords": [],
  "author": ""
}

enter image description hereI'm starting to use Angular.

Installed the latest node.js(v6.11.2) installed typescript installed angular cli 1.0.0

used ng new --ng4 angular-hello-world to create a project.

then went to the project location

ng serve.

the server works and I get the 'Loading...' text, but the angular isn't loading to get the 'app works' text.

I am doing this at work with a proxy server, but I don't think that is the issue seeing as that the project was created successfully and the ng serve command starts the server successfully.

If I add normal html markup to the index.html file, I can see it when the page refreshes. So it must be working.

Just not loading the angular.

Can anyone help me?

Thanks

Ivan
  • 143
  • 2
  • 12
  • 1
    Can you look in the browser console? Are there any errors there? – Lansana Camara Aug 08 '17 at 12:07
  • I see one yes. Uncaught TypeError: Object.assign is not a function – Ivan Aug 08 '17 at 12:10
  • Also, please read the getting started tutorial. angular-cli 1.0.O is obsolete, --ng4 is the default – JB Nizet Aug 08 '17 at 12:12
  • 2
    Install/Update latest typescript. Than `npm install -g @angular/cli` after that -> `ng new angular-hello-world` -> `ng serve` – a45b Aug 08 '17 at 12:12
  • Please use the offical quickstart [https://angular.io/guide/quickstart](https://angular.io/guide/quickstart) – Poul Kruijt Aug 08 '17 at 12:13
  • 1
    Here is a tutorial on how to upgrade `angular-cli` https://stackoverflow.com/questions/43931986/how-to-upgrade-angular-cli-to-the-latest-version. Pretty certain (like others) upgrading will solve your issue. There have been a number of changes to angular since `angular-cli 1.0.0`. For example, the entire angular codebase changed locations to `@angular`. – Zze Aug 08 '17 at 12:24
  • Please post code.... – Wesley Coetzee Aug 08 '17 at 12:44
  • I tried all the above. Getting the same error. Looked the error up. Something about Google Chrome using V8 and ECMAScript 5th edition – Ivan Aug 08 '17 at 12:56
  • Please post the error as well – Emile Cantero Aug 08 '17 at 12:59
  • I haven't added any code yet. It's just the core project stuff. If you want that? – Ivan Aug 08 '17 at 12:59
  • added a snippet of the error I'm getting – Ivan Aug 08 '17 at 13:25
  • @Ivan can you post your package.json – Rahul Singh Aug 08 '17 at 13:32
  • @Rahul ok I ran npm init --yes and added it in – Ivan Aug 08 '17 at 13:44
  • @Ivan it should work , this might seem silly but can you just scrap the whole thing and do a simple `ng new and then npm install`.Make sure to delete node modules – Rahul Singh Aug 08 '17 at 13:46
  • I'll try that. Just to be sure I'm doing it correctly. How do I make sure I delete all node modules? – Ivan Aug 08 '17 at 13:50
  • Well guys and girls... I went and did this same stuff on my pc at home and it all worked perfectly. So I'm stumped on this one. Any chance that the windows 7 version of cmd might be making things more difficult? – Ivan Aug 08 '17 at 18:34
  • I fixed the problem. It was a polyfill issue. Because we're not allowed to update our Chrome (we're actually not allowed to use chrome at all) I needed to uncomment the polyfill lines in "polyfills.ts". – Ivan Aug 10 '17 at 07:52

0 Answers0