Getting started with ES6 using VS Code and Lite Server

For learning ES6 online editors like jsbin and plnkr are suboptimal. See following example where I want to access the DOM: http://next.plnkr.co/edit/w1lrKNNCXpYbJqAr

plnkr-security-error

I recommend using Visual Studio Code with Lite Server from John Papa.

First you need to install Node.js – see my post Angular with Visual Studio Code – Getting Started.

Then you can install the Lite Server – see following post. You can jump to step 2 since you already installed Node.js: Visual Studio Code and local web server from Laurent Duveau.

That’s it – just type npm start for starting the server!

vs-code-with-lite-server

Read More

Angular with Visual Studio Code – Getting Started [Update]

Here’s a little step-by-step guide to get started with learning Angular 6. My preferred editor is Visual Studio Code so let’s get go! :)

1) Install packages the right way

I would strongly recommend to begin with Angular’s best practices. Using Angular CLI  makes your life easy – it already follows their best practices!

So: begin with …

2) Installing NVM – “Node Version Manager”

Why? Because using Node Version Manager fixes a lot of issues with Angular CLI. Here’s how to install it on Windows machines and here’s how to install on Linux/OS. Now you can…

3) Install Node.js via NVM

Node.js is the compiler. Important: don’t use the download from Node.js since that would install Node.js paralell and not managed via NVM. Since NVM has Node.js “on board” you can install it by simply entering nvm install latest in the command line interface. Now switch to use this latest specified version by entering nvm use <version>:

nvm-use

 

This is my console output:

H:\>nvm use 10.10.0
Now using node v10.10.0 (64-bit)

4) Install Angular CLI

Here’s the GitHub guide how to install it. Please take care of the prerequisites.

That’s it! As David Walsh wrote – see link:

nvm has been a lifesaver for me, especially when troubleshooting issues in projects where the user may have more than one Node.js version.

Read More