Skip to content

Commit 0f33900

Browse files
committed
cleaner notes
1 parent 89ab0d1 commit 0f33900

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

notes.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
# Notes
22

3-
## HTML5 pushState routes
4-
- base href element with desired prefix (eg: admin)
5-
- with trailing slash
6-
- avoid the prefix in the routes
7-
- use ui-sref
8-
- ojo con usar `.` en los state names, porque significa nested states! (dar mini explicacion?)
3+
## Conectar con API
4+
- [$http](https://docs.angularjs.org/api/ng/service/$http)
5+
- [$resource](https://docs.angularjs.org/api/ngResource/service/$resource)
6+
- [restangular](https://github.com/mgonto/restangular)
7+
8+
## Tags
9+
- Usamos [ngList](https://docs.angularjs.org/api/ng/directive/ngList) para hacer una interaccion copada con el string delimitado por comas
10+
- En el repeat, usamos `track by $index` para que no pinche con duplicados -- [ref](https://docs.angularjs.org/error/ngRepeat/dupes?p0=tag%20in%20article.tags&p1=string:tag&p2=%22tag%22)
911

1012
## Directives
1113
- Attribute vs Element:
1214
- When should I use an attribute versus an element? Use an element when you are creating a component that is in control of the template. The common case for this is when you are creating a Domain-Specific Language for parts of your template. Use an attribute when you are decorating an existing element with new functionality. -- [ref](https://docs.angularjs.org/guide/directive)
1315
- Scope binding
14-
- using @ vs = [info](http://stackoverflow.com/questions/14050195/what-is-the-difference-between-and-in-directive-scope)
16+
- @ vs = [info](http://stackoverflow.com/questions/14050195/what-is-the-difference-between-and-in-directive-scope)
1517

16-
## Tags
17-
Usamos ngList para hacer una interaccion copada con el string delimitado por comas
18-
https://docs.angularjs.org/api/ng/directive/ngList
19-
- En el repeat, usamos `track by $index` para que no pinche con duplicados -- [ref](https://docs.angularjs.org/error/ngRepeat/dupes?p0=tag%20in%20article.tags&p1=string:tag&p2=%22tag%22)
20-
21-
## LocalStorage first
22-
Cuando arrancamos a prototipar es comodo arrancar con un servicio que persista LocalStorage del browser y después es cuestión de cambiar el servicio o crear un nuevo servicio que se conecte con la API que realizaremos en CUBA
23-
24-
## markdown help
25-
- hack de clases para hacer que no se vea hasta que cargo todo -- [ref](http://stackoverflow.com/questions/17985390/angular-animate-ng-cloak-opacity)
26-
27-
## API
28-
- $http vs [$resource](https://docs.angularjs.org/api/ngResource/service/$resource), y restangular
18+
## HTML5 pushState routes
19+
- base href element with desired prefix (eg: admin)
20+
- with trailing slash
21+
- avoid the prefix in the routes
22+
- use ui-sref
23+
- ojo con usar `.` en los state names, porque significa nested states! (dar mini explicacion?)
2924

3025
## UI Router
31-
Para poder cambiar de estado en los diferentes jsControllers hay que inyectar $state.
32-
De esta manera se puede hacer $state.go('articles')
26+
- Para poder cambiar de estado en los diferentes jsControllers hay que inyectar $state. De esta manera se puede hacer $state.go('articles')
27+
28+
## Markdown help
29+
- Hack de clases para hacer que no se vea hasta que cargo todo -- [ref](http://stackoverflow.com/questions/17985390/angular-animate-ng-cloak-opacity)
3330

0 commit comments

Comments
 (0)