unidades:04_masdirectivas:07_ngswitch
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Próxima revisión | Revisión previa | ||
| unidades:04_masdirectivas:07_ngswitch [2014/07/31 19:41] – creado admin | unidades:04_masdirectivas:07_ngswitch [2014/08/29 23:02] (actual) – admin | ||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| ====== 4.7 ng-switch ====== | ====== 4.7 ng-switch ====== | ||
| - | La directiva ng-switch es similar a | + | La directiva |
| + | |||
| + | Esta directiva realmente está compuesta por 4 distintas: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | Veamos un ejemplo: | ||
| + | <sxh html; | ||
| + | <div ng-switch | ||
| + | <div ng-switch-when=" | ||
| + | <div ng-switch-when=" | ||
| + | <div ng-switch-default> | ||
| + | </ | ||
| + | </ | ||
| + | * Línea 1: Indicamos que es un switch con la directiva '' | ||
| + | * Línea 2: Una posible opción cuando '' | ||
| + | * Línea 3: Si '' | ||
| + | |||
| + | <note important> | ||
| + | Al igual que con [[unidades: | ||
| + | </ | ||
| ===== Ejemplo ===== | ===== Ejemplo ===== | ||
| Línea 7: | Línea 28: | ||
| ===== Referencias ===== | ===== Referencias ===== | ||
| * [[https:// | * [[https:// | ||
| - | |||
unidades/04_masdirectivas/07_ngswitch.1406828495.txt.gz · Última modificación: por admin
