In a mini test that I made there were 4 (true/false) questions about UI Router VS ngRoute. I did the test and my research, but I am not sure about my answers. Can someone please confirm and help me justify?
The questions:
- Angular UI Router allows you to save state when switching tabs, ngRoute does not
- They both use URLs to uniquely identify views
- They both associate a template and a controller with a view
- They both use the same service for route parameters
My answers:
- True
- True
- False
- True
My justifications:
- Following from the question " What is the difference between angular-route and angular-ui-router? " I am fairly sure that option 1 is true.
- Now this one I am not sure. I know that you can use UI Route to create dynamic URLs, but that is as far as my knowledge goes.
- This one I believe is false. In an Angular UI template one can have several views, in fact a common example is with pages that have a top section, a middle section and a common bottom section. If this implication however means that the affirmation is incorrect, I am not sure, but I am led to believe it.
- Given that Angular UI is an extension of ngRoute, I believe that 4 is also true.