Created
June 13, 2015 16:43
-
-
Save NrI3/13983eb718af5945bedd to your computer and use it in GitHub Desktop.
Angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Abmbito del controlador | |
$scope | |
Directivas | |
Etiquetas html que llaman a Angular o corre o referenciar codigo javascript. | |
ng-app -- Carga un modulo | |
ng-controller -- Carga un controlador | |
ng-show -- Muestra el contenido de la etiqueta | |
ng-hide -- Oculta el contenido de la etiqueta | |
ng-repeat -- Itera entre un array y repite el contenido dentro de la etiqueta | |
ng-src -- Se utiliza para cargar imagenes | |
ng-init -- Inicializa un controlador | |
ng-bind -- Enlaza una funcion o attributo de un controlador a una expresion | |
ng-click -- Dispara un evento | |
ng-class | |
ng-submit | |
ng-model -- Contiene controladores y Modulos como dependencias | |
ng-include | |
Modulos | |
Llamar a un modulo | |
angular.module('miModulo',[]); | |
LLamar a un module | |
ng-app="miModulo" | |
Expresiones | |
{{ 3 + 1 }} | |
{{"Hola, Angular"}} | |
Filtros | |
{{ store.price | currency }} | |
{{ data | filter:options }} | |
{{ '1388123412323' | date:'MM/dd/yyyy @ h:mma'}} | |
{{ 'octava gema' | uppercase }} | |
{{ 'Mi Descripcion' | limitTo:8 }} | |
<li ng-repeat "product in store.products | limitTo:3" > | |
<li ng-repeat "product in store.product | orderBy:'-price'" > | |
Modelos | |
Asigna un modelo mediante la directiva ng-model en la etiqueta deceada | |
Enlaza el valor del elemento del formulario con la propiedad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment