r/angularjs • u/consultwithmike • Apr 18 '16
UI Router Cheat Sheet
https://www.trainwithmike.us/blogs/geeks-only/103066054-ui-router-cheat-sheet2
u/cutebabli Apr 18 '16
Nice cheat sheet. Thanks.
1
u/consultwithmike Apr 18 '16
Thanks a lot! I'm working hard to provide a lot of these for the community and hoping the community will help me with what else should be added!
1
u/empurium Apr 19 '16
Nice, thanks for this. I really need to spend some time reading about ui-router. I'm still using a list of .when() URL's and .otherwise(), haven't played with states at all yet.
1
u/consultwithmike Apr 19 '16
Great! I'm glad this stemmed that thought for you. I believe that the UI Router is probably more powerful that even common users of it know. Hopefully I can get that UI Router Demystified course done soon!
-1
u/anonym1970 Apr 18 '16
How is that any better than the real docs?
2
u/consultwithmike Apr 18 '16
Because the real docs are just like any other set of specifications. You have to dig for the most used processes, and some things like named views or grandparent named views or resolvers aren't near as clear because they often lack real world examples.
Furthermore, the cheat sheet (as it grows) is going to contain things like real world examples for resolvers and it's also a place where the users can comment on what else they'd like added.
It's by definition not documentation; it's a cheat sheet.
While I pull some things from the docs, like descriptions and such in certain places, the goal was to get a quick swipe location for the most commonly used pieces.
-12
-3
u/cjthomp Apr 18 '16
This prints horribly, there is a lot of wasted space in the margins, and the font is huge.
3
u/consultwithmike Apr 19 '16
That's not surprising, it's not in a printer friendly format.
I hadn't even considered people would want to print it. Just figured it'd be bookmarked and returned to. I can look into printer friendly versions of these cheat sheets.
Thanks for the feedback.
-13
3
u/cac2573 Apr 20 '16
Can we route directly via components now? I don't see anything about it in the docs.