Posts

Showing posts from 2017

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

How to add Angular2 Material in our Angular2 Projects
Como agregar Angular2Material a un Proyecto Angular2

Image
Hi everyone, in this post you are going to find how you can setup  Angular2Material Components in your Angular2Project. What is Angular2Material? Angular2Material has several components so far which you can use them to build you own Angular 2 Application, Angular2Material is based in MaterialDesign https://material.io/guidelines/ How does it work? Please follow the next steps in order to add Angular2Material, but First of all, you need set up a basic Angular 2 Project which you can setup it using this post=>  Steps to build your first Angular 2 Application . 1st Install Angular2 Material Please using visual studio code open an Integrated Terminal and run this command. npm install --save @angular/material After the command finish take a look into the package.json and you have to see that Angular2Material was added. 2nd Add Animations Angular2Material has component with much animations therefore we need install them in order to

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 using