Angular installation 2

Asked

Viewed 1,516 times

0

I have a website ready, it is static. I would like to install Angular 2 on it. I installed the angle from the command npm install @angular/cli and tried to put the html, css, jquery files in it but I’m not getting.

Can anyone explain to me how you do it? Thank you!

3 answers

3

First you need to do the overall installation of the package using the command

npm install -g @angular/cli

then create an angular design with the command

ng new "nome do app"

ai you can put your files in the src - app folder, always following the angular pattern that you can learn best in the start guide of the angular itself

https://angular.io/docs/ts/latest/cli-quickstart.html

0

As the documentation explains you should use the command

npm install -g @angular/cli

To get access to the command line tool that creates and manages projects at an angle. The reason it doesn’t work is that with the flag -g indicates that you are installing the NPM package in global mode, i.e., you will be able to use it by running ng [options] after performing the installation. Without the flag you are installing the angular cli in your current folder and not the angular itself.

Follow the initial Angular 2 tutorial to learn how to use the framework correctly.

Source: https://angular.io/docs/ts/latest/cli-quickstart.html

0

To set up your Angular development environment follow these steps:

Angular Configuration:

**Downloads:

--> Node: https://nodejs.org/en/download/ (Windows Installer)
--> Git: https://git-scm.com/downloads
--> Visual Studio Code: https://code.visualstudio.com/download

After installing NODE and Git, configure the environment variables:

..........................................Configuring the environment variable...................................

*Go to "View Advanced System Settings" in the Windows search bar and click "Environment Variables..."

*Create the path below in the field, "System Variables"...

--> Clique em Novo...;
--> Nome da variável: PATH (Tudo maiúsculo);
--> Valor da variável: C:\Program Files\nodejs;C:\Users\NOME_DO_USUÁRIO\AppData\Roaming\npm;C:\Program Files\Git\cmd

..............................................Testing..........................................................

*Installing the Angular:

---> Abra o cmd:
---> Vá para a raiz;
---> Execute: "npm install -g @angular/cli". 

*Create a new project:

---> Execute: "ng new projetoAngular":
---> Escreva Y e clique em Enter;
---> vá na opção SCSS com as setas e clique em Enter.

*See if the project was created correctly:

---> Abra o projeto(folder) c:\projetoAngular no Visual Studio Code.

*To start the server:

---> Abra o cmd;
---> Vá para a raiz;
---> Entre na pasta projetoAngular (Cd projetoAngular);
---> Execute: "ng serve".

*Testing in the browser with:

---> localhost:4200.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.