How/when to use ng-click to call a route?

Routes monitor the $location service and respond to changes in URL (typically through the hash). To “activate” a route, you simply change the URL. The easiest way to do that is with anchor tags. <a href=”#/home”>Go Home</a> <a href=”#/about”>Go to About</a> Nothing more complicated is needed. If, however, you must do this from code, the … Read more

AngularJS routing 404 error with HTML5 mode

HTML5 mode requires URL rewriting. From the Docs: HTML5 Mode Server side Using this mode requires URL rewriting on server side, basically you have to rewrite all your links to entry point of your application (e.g. index.html). Requiring a <base> tag is also important for this case, as it allows AngularJS to differentiate between the … Read more

angularjs 1.6.0 (latest now) routes not working

Simply use hashbang #! in the href: <a href=”#!/add-quote”>Add Quote</a> Due to aa077e8, the default hash-prefix used for $location hash-bang URLs has changed from the empty string (”) to the bang (‘!’). If you actually want to have no hash-prefix, then you can restore the previous behavior by adding a configuration block to your application: … Read more