Si lo que quieres es saber qué necesitas ahora mismo para empezar a utilizar Angular, has llegado al sitio indicado. Angular es una excelente herramienta que te otorgará una excelente y singular forma de programar en JavaScript.
Incluyendo los scripts de AngularJS desde la CDN de Google
La forma más rápida de empezar a utilizar esta poderosa herramienta, es utilizar tu ya conocida tu etiqueta de lenguaje html to a Url from Google CDN. In this way, you will not have to download anything to your personal computer, nor will you have the need to maintain a local copy.
There are two types of AngularJS script urls that you can use. It is very simple, you only have to choose one of them; there is one for development and one for production:
- angular.js: Esta es la versión legible para los seres humanos, ya que no está modificada, y es sumamente recomendada paraadecuada para el desarrollo Web.
- angular.min.js: This is already the mined version, which I strongly recommend you use most of all for production.
Para dirigir tu código a un script de AngularJS alojado en el server CDN de Google, utiliza la plantilla mostrada en la parte inferior de este párrafo, es importante recalcarte que este ejemplo va dirigido especialmente a la versión minimizada 1.5.6. Aquí te lo dejo:
<!DOCTYPE html> <html ng-app> <head> <title>Mi primer proyecto en Angular JS</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script> </head> <body> </body> </html>
📝 Note: Please note that only versions 1.0.1 and above are available on the CDN. If you need an older version (which you shouldn't need or use) you can use the URL https://code.angularjs.org/, la cual es la ubicación recomendada anteriormente para el source code de versiones anteriores. Si todavía estas utilizando el servidor AngularJS, deberias cambiar a la versión CDN para obtener tiempos de carga aún más rápidos.
Download and host AngularJS files locally
This option is for those who want to work with AngularJS offline, or for those who want to host AngularJS files on their own servers.
If you navigate to https://code.angularjs.org/You will see a directory listing with all the versions of AngularJS since we started releasing the versioned build artifacts. Each directory contains all the artifacts that we release for a particular version. Download the version you want and have fun.
Note: You can ignore directories that start with 2. (eg 2.0.0.0-beta.17) - they are not related to AngularJS. They contain build artifacts from the Angular versions.
Each directory under https://code.angularjs.org/ includes a set of files that comprise the corresponding version. All JavaScript files (except for Angular files, which are only used during development) come in two versions: one suitable for development and one suitable for production:
- .js – Estos archivos no están ocultos, no están modificados y son legibles por el ser humano al abrirlos en cualquier editor o browser. Para obtener mejores mensajes de error durante el desarrollo, siempre debe utilizar estos scripts no modificados.
- .min.js – Son versiones minimizadas y ofuscadas, creadas con el compiler de Closure. Utilice estas versiones para la producción con el fin de minimizar el tamaño de la aplicación que descarga el navegador de su Username.
- .min.js.map - These are sourcemap files. You can serve them together with the .min.js files so that you can debug your minified code (for example, in a production deployment) more easily, but without affecting performance.
The set of files included in each version directory is:
- angular.zip - This is a zip file that contains all the files released for this version of AngularJS. Use this file to get everything in one download.
- angular.js - The core of the AngularJS structure. This is all you need to get your AngularJS application working.
- angular-csp.css - You only need this file if you are using CSP (Content Security Policy). See here for more information.
- angular-mocks.js - This file contains a mock implementation that makes testing angular applications even easier. Your unit / integration test harness should load this file after loading the angular.js file.
- angular-loader.js – Cargador de módulos para módulos AngularJS. Si está cargando múltiples archivos de script que contienen módulos AngularJS, puede cargarlos asincrónicamente y en cualquier orden siempre y cuando cargue primero este archivo. A menudo el contents de este archivo se copia y pega en el index.html para evitar incluso la petición inicial al cargador angular[.min].js. Vea Semillas angulares para un ejemplo de uso.
- Additional AngularJS modules: Optional modules with additional functionality. These files must be uploaded after the file [.min] .js angular core:
- angular-animate.js – Habilitar el soporte de animación. (API docs)
- angular-aria.js - Make your applications accessible to assistive technology users. (API docs)
- angular-cookies.js - A convenient wrapper to read and write browser cookies. (API docs)
- angular-message-format.js - Improved support for pluralization and gender-specific messages in interpolated text. (API docs)
- angular-messages.js - Improved support for displaying validation messages. (API docs)
- angular-parse-ext.js - Allow Unicode characters in identifiers within AngularJS expressions. (API docs)
- angular-resource.js - Easy interaction with RESTful services. (API docs)
- angular-route.js - Routing and deep-linking services and directives for AngularJS applications. (API docs)
- angular-sanitize.js - Functionality to sanitize HTML. (API docs)
- angular-touch.js - Touch events for touch devices. (API docs)
- docs / - This directory contains all the files that make up the documentation application https://docs.angularjs.org/ These files are useful for viewing previous versions of our documents or, more importantly, for viewing documents offline.
- i18n / - This directory contains modules ngLocale AngularJS location specific to override the default values defined in the module ng principal.
Why is this project called "AngularJS"? Why is the namespace called "ng"?
Because HTML has angle brackets and "Ng" sounds like "AngularJS".
¿Es AngularJS una biblioteca, framework, plugin o una extensión de navegador?
AngularJS fits the definition of a framework better, although it is much lighter than a typical framework and that is why many confuse it with a library.
AngularJS es 100% JavaScript, 100% client y compatible con browsers de escritorio y móviles. Así que definitivamente no es un plugin o alguna otra extensión nativa del navegador.
¿Qué es la strategy de versionado de AngularJS?
In AngularJS we do not allow intentional break changes to appear in versions where only the "patch" number changes. For example, between 1.3.12 and 1.3.13 there can be no breakout changes. We allow breakout changes to occur between "minor" number changes. For example, between 1.3.15 and 1.4.0 there are a number of breakout changes. This means that AngularJS does not follow semantic versioning (semver) where break changes are only allowed when the "major" version changes.
We also allow breakout changes between beta versions of AngularJS. For example, between 1.4.0-beta.4 and 1.4.0-beta.5 there may be breakout changes. We strive to minimize these types of changes only in cases where there is a strong use case, such as a highly requested feature enhancement, significant code simplification, measurable performance improvement, or better experience. from the developer (especially when it comes to upgrading to Angular).
When we are doing a release we generate updates to the changelog directly from commits. This generated update contains a highlighted section that contains all the break changes that have been pulled from commits. We can quickly see in the new changelog exactly which commits contain break changes and so can application developers when they are deciding whether to upgrade to a new version of AngularJS.
Features with non-breaking changes may also appear in the patch version, for example in version 1.6.3 there may be a feature that is not available in 1.6.2.
Lastly, feature deprecation can also show up in "minor" version updates. This means that the features will continue to work in this release, but sometimes they need to be specifically activated.
When are deprecated functions removed from the library?
Most of the time we remove an outdated feature in a new minor version. For example, the preAssignBindingsEnabled method $compileProvider was defined in AngularJS 1.5.10, deprecated in 1.6, and will be removed in 1.7.
En el caso de jqLite aplicamos una estrategia diferente – desaprobamos las características que tienen un equivalente en jQuery que también es desaprobado, pero sólo eliminamos la característica una vez que se elimina de jQuery para mejorar la compatibilidad entre jqLite y jQuery. Un ejemplo de ello es el método bind, obsoleto a favor de on pero que no es probable que be eliminado de jqLite en un futuro cercano.
Is AngularJS a template system?
At the highest level, AngularJS looks like just another template system. But there is an important reason why the AngularJS template system is different, which makes it well suited for application development: bi-directional data binding. The template is compiled in the browser and the compilation step produces a live view. This means that you, the developers, do not need to write code to constantly synchronize the view with the model and the model with the view as in other template systems.