[Fuente: http://docs.angularjs.org/tutorial]
En este tutorial introducimos AngularJS haciendo una aplicación web de ejemplo. La app que haremos será un catálogo que muestra una lista de dispositivos Android, permite filtrar la lista y ver los detalles de un dispositivo.
Según avances por este tutorial:
- Ver ejemplos de cómo utilizar client-side data binding y dependency injection para construir vistas dinámicas de datos que cambian inmediatamente en respuesta a acciones del usuario.
- Ver cómo Angular crea listeners sobre tus datos sin la necesidad de programar manipulación DOM
- Aprende de una forma fácil a testear tus aplicaciones web
- Aprende cómo utilizar servicios Angular para hacer tareas web comunes, como recuperar datos para mostrarlo, de una forma fácil.
- Y todo esto funciona en todos los navegadores!
Cuando finalices este tutorial serás capaz de:
- Crear una aplicación dinámica que funcione en cualquier browser.
- Definir las diferencias entre Angular y otros frameworks Javascript
- Entender cómo funciona el data binding en AngularJS
- Utilizar el angular-seed project como base para empezar proyectos nuevos
- Crear y ejecutar test
- Identificar recursos para aprender más sobre AngularJS
You can go through the whole tutorial in a couple of hours or you may want to spend a pleasant day really digging into it. If you’re looking for a shorter introduction to AngularJS, check out the Getting Started document.
Working with the code
You can follow this tutorial and hack on the code in either the Mac/Linux or the Windows environment. The tutorial relies on the use of Git versioning system for source code management. You don’t need to know anything about Git to follow the tutorial. Select one of the tabs below and follow the instructions for setting up your computer.
- You will need Node.js and Karma to run unit tests, so please verify that you have Node.js v0.8 or better installed and that the
node
executable is on yourPATH
by running the following command in a terminal window:- node –version
Additionally install Karma if you don’t have it already:
- npm install -g karma
- You’ll also need Git, which you can get from the Git site.
- Clone the angular-phonecat repository located at Github by running the following command:
- git clone git://github.com/angular/angular-phonecat.git
This command creates the
angular-phonecat
directory in your current directory. - Change your current directory to
angular-phonecat
:- cd angular-phonecat
The tutorial instructions assume you are running all commands from the
angular-phonecat
directory.You should run all
git
commands from Git bash.Other commands like
test.bat
ore2e-test.bat
should be executed from the Windows command line. - You need an http server running on your system, but if you don’t already have one already installed, you can use
node
to runscriptsweb-server.js
, a simple bundled http server.
The last thing to do is to make sure your computer has a web browser and a good text editor installed. Now, let’s get some cool stuff done!