Posts

Showing posts with the label angular2

How to run ng serve in a different port
Como ejecutar ng serve en un puerto diferente

Image
Hello Everyone, In his post I'm going to explain How we can use a different port that ng use for default(4200). Maybe if we have an Angular 2 Project running, and then we also need another project running, and when we try to execute the ng serve command, CLI give us a message like this. Port 4200 is already in use. Use '-port' to specify a different port port 4200 is busy So we should execute a new command like this, it has to fix the problem. Altough you might use a different port 4202,4203 etc. ng serve --port 4201 ng serve running in a different port I hope this will help all of you in your amazing Angular 2 Project. See you next time.

How to create a new Component in Angular2
Como crear un nuevo Component en Angular2

Image
Hello everyone, In this post you are going to find how you can create a new Component using Angular CLI, and also add it in an html file. If you don't know how to create an Angular 2 Project, please see this post to complete it first http://angular2university.blogspot.pe/2017/06/steps-to-build-your-first-angular-2.html Angular CLI provide us a set of command to create some things of Angular 2, in this case we are going to use the first one. Scaffold Usage Component ng g component my-new-component Directive ng g directive my-new-directive Pipe ng g pipe my-new-pipe Service ng g service my-new-service Class ng g class my-new-class Guard ng g guard my-new-guard Interface ng g interface my-new-interface Enum ng g enum my-new-enum Module ng g module my-module Execute this Command to create a 'customers' component. ng g component customers When the command is finished you should see that a new folder was created as you can see bel...

Steps to build your first Angular 2 Application.
Pasos para construir tu primera aplicación Angular2

Image
Hey There! First of all, I'd like show you How you can build your first Angular 2 Application, Ok Let's do it. 1.- You are going to need Visual Studio Code, Therefore you can download it from this URL. https://code.visualstudio.com/ , This IDE is very powerfull and lightweight. Visual Studio Code 2.- Now you need install nodeJS you must download it from this url. https://nodejs.org/es/download/, NodeJs comes included with npm, npm allow us to install differents kinds of packages into ours angular 2 applications, After you install it, please check whether NodeJS was installed succesfully using the command below. node -v Node JS Version 3. Now follow the next steps to install an Angular 2 Application, you need open a command prompt. Install Angular CLI using npm . Run this command   npm install -g @angular/cli   it can spend some minutes. Angular CLI helps us to build an Angular2 Application more fast. Create a New Angular 2 Proyect usin...