After creating a mini test focusing on UI Router vs. ngRoute, I found myself unsure about some of my answers. Could someone please take a look and help me confirm or correct my responses?
The questions:
- UI Router can save state when tabs are switched, while ngRoute cannot
- Both UI Router and ngRoute use URLs to identify views uniquely
- Each of them links a template and a controller with a view
- They rely on the same service for managing route parameters
My answers:
- True
- True
- False
- True
My justifications:
- Based on information from a discussion on Stack Overflow, I am confident that option 1 is indeed true.
- I'm uncertain about this one; although I know UI Router can create dynamic URLs, that's as far as my knowledge goes.
- I believe this statement is false. With Angular UI templates, multiple views can exist, such as top, middle, and bottom sections, which suggests this answer may be incorrect.
- Given that Angular UI builds upon ngRoute, it seems logical that number 4 is true as well.