AngularJS with route and JSON API

Doublecheck if there’s a “nobase” error in your console. If so, according to the AngularJS documentation, and fix.io (credits for this answer go to the author of that post) the base tag is to the rescue.

<html ng-app="app">
<head>
    <base href="https://wordpress.stackexchange.com/angular-wp/">
    <title>AngularJS Demo Theme</title>
<?php wp_head(); ?>

Please note the “/angular-wp/” is the sub-context in this case (the test url is like “http://localhost/angular-wp/”), you should replace it accordingly. If you set the wrong base href, you’ll get an error like this or this.