Using Django URLs with AngularJs routeProvider : <p>for a project, I am using Django on the back-end and AngularJs on the front end.</p>

<p>Basically, what I want is to run the Angular app only when the url starts with <code>projectkeeper/</code>.</p>

<p>In other words, lets say my website is example.com. I want the angular app to run for the URLs <code>example.com/projectkeeper/dashboard/</code>, <code>example.com/projectkeeper/projects/</code> and so on, but not on <code>example.com/about/</code>.</p>

<p>Hope I have made myself clear. Anyway, in order to do this, I am doing the following with my code:</p>

<p><strong>urls.py</strong></p>

<pre><code>urlpatterns = [
    url(r'^projectkeeper/$', TemplateView.as_view(template_name='base.html')),
]
</code></pre>

<p>In the template <strong>base.html</strong>, I refer to my angular app obviously. For the angular routing, I have done the following:</p>

<pre><code>myapp.config(['$routeProvider', function($routeProvider) {
    $routeProvider
        .when('/dashboard/', {
            title: 'Dashboard',
            controller : 'DashboardController',
            templateUrl : 'static/app_partials/projectkeeper/dashboard.html'
        })
        .otherwise({ redirectTo : '/' });
}]);
</code></pre>

<p>So, ideally, what I thought was that going to <code>example.com/projectkeeper/#/dashboard/</code> would run the DashboardController from my angular app. However, this is not the case, I only get an empty page which means the routing was incorrect.</p>

<p>Any solutions to this? As I said before, I want is to run the Angular app <strong>only</strong> when the url starts with <code>projectkeeper/</code>.</p>
