gmocamilotd
9/3/2017 - 3:13 AM

Instalacion de angular

(angular) Instalacion de angular, de arturo

1.- Descargar e instalar NodeJs Pagina oficial de Nodejs : https://nodejs.org/es/download/

2.- Verificar la instalación de nodejs y npm node -v npm -v

La version de NodeJs debe ser superior a 4. La version de npm debe ser superior a 3.

3.- Instalar angular-cli Abrir la línea de comandos, escribir : Verificar la instalación de angular-cli ng --version

En caso de no tener instalado el angular-cli, escribir: npm install -g @angular/cli@latest

Pagina oficial : https://github.com/angular/angular-cli

4.- Instalar stylus npm install stylus -g

5.- Crear un proyecto en angular ng new nombre_proyecto --style=”styl”
esto crea la carpeta necesaria

6.- Ejecutar el proyecto. Buscar el nombre del proyecto que se creó, escribir :

Primera forma, escribir en la línea de comandos : ng serve

Segunda forma, escribir en la línea de comandos: npm start


para instalar angular se necesita tener instalado:

  • typescript
  • typings

para instalar angular material se necesita tener instalado:

  • @angular/cdk
  • @angular/core
  • @angular/common

toto se puede instalar en una sola linea npm install -g @angular/core @angular/common @angular/core
y luego se puede instalar
npm install -g @angular/material


instalar typescript

npm install typescript@latest -g
-g :: global

como instalar angular 2
npm install -g @angular/cli@latest

como desinstalar angular
npm uninstall -g @angular/cli

instalar typings
npm install -g typings
Typings is another Node module that we use to reference existing Javascript libraries in TypeScript.

intellij::Creating new Angular 2 project with Angular CLI
https://jaxenter.com/angular-2-intellij-netbeans-eclipse-128461.html

What is the Angular-cli?

  • Put simply, it's a command line interface for Angular. It allows you:
  • Quickly generate a new Angular 2 project.
  • Generate routes, components, services and pipes.
  • Serve your application.
  • Test your application.
    In a nutshell, it's a workhorse that cuts out a lot of the tedious work involved with Angular development. So let's get started on how to install angular2 with the angular-cli.

Config files package.json => Here we can specify the package dependencies for the project.

tsconfig.json => defines how the TypeScript compiler generates JavaScript from the project’s files. typings.json => provides additional definition files for libraries that the TypeScript compiler doesn’t natively recognize.

systemjs.config.js => provides information to a module loader about where to find application modules, ana registers all the necessary packages. It also contains other packages that will be needed by later documentation examples.

Packages @angular/materail-->/cdk CDK is the short form of component dev kit.

Several components in core/, such as Overlay, have had their prefix changed to cdk- (short for "component dev kit"). This signifies that these are general-purpose tools for building components that are not coupled to Material Design.The old selectors are still available as deprecated but will be removed in the next release. The CSS classes have been changed.