You are here

Playing with Angular2

logoReference material

Articles

Angular and IntelliJ IDEA Ultimate

For Linux Mint 18.1 distribution (based on Ubuntu Xenial), adhering to IntelliJ guidelines:

  • check that AngularJS plugin is installed and enabled
  • install Node.js (version 6.10.2) using the package manager. This operation installs npm 4.4.4 as well
  • in IntelliJ IDEA, check local Node.js interpreter (/usr/bin/nodejs 6.20.2) and Npm package (/usr/lib/node_modules/npm 3.10.10)
  • in IntelliJ terminal:
sudo npm install -g @angular/cli
  • create a new project, selecting Static Web and Angular CLI
  • for Node interpreter, select /usr/bin/node
  • for Angular CLI, select /usr/local/lib/node_modules/@angular/cli
  • in IntelliJ terminal, type ng serve. The application is available at http://localhost:4200

Resulting package.json file contains following data:

{
"name": "test-angular01",
"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/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.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}

Bootstrap

Install ng-bootstrap, from IntelliJ terminal:

npm install --save @ng-bootstrap/ng-bootstrap

to be continued...