Two way binding (don't know why all hate this I personally love it)
You don't have to deal with jQuery (angular uses it behind the scenes)
Less code because of directives, factories, services
MVC architecture
DOM manipulation is done by Angular. You just need to give it something like ng-show="variable". Now you can control the variable in the code and can show/hide elements without any extra work.
With protractor and jasmine in combination you can write nice and easy unit/e2e tests.
@JanVladimirMostert If you use html5Mode in Angular's router, Angular will automatically fallback to hashbang for older browsers - so, you are supporting everybody here.
Wow, that's aweosme! So if I can tell users that only IE11+ is supported and every other modern version of Chrome / Firefox / Safari, then I can use this history.pushState.
Two-way binding + the routing sounds like enough reasons to try Angular out, thanks @Sandeep !
The # I can understand how to route everything to a single page - it's simply the onhash change event doing its magic.
How does the second example work? Wouldn't omitting the # cause page reloads every time the url changes?
Or is the second example Angular running server side instead of in the browser ?
The # depends on how you configure ui-router, either with html5 mode or without.But like you see a url is not different to a normal url you only have to configure the router properly.