0

I am new to this Django-Angular JS integration. I created few web pages in AngularJS, views were working fine. As soon as I integrated with Django, first I had to correct paths to work but still views are not working. The view part stays blank and also grows in length (as if it goes into some loop!). Any idea guys?

EDIT:

Below is the way I am calling the view inside verbatim section of index.html

<div ng-view=""></div>

My js config file:

'use strict';
var mainAngular = angular.module('bazaar',['ui.bootstrap', 'ngRoute', 'ngCookies']).run(function($http, $cookies) {

$http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken;
});

mainAngular.config(function($routeProvider, $locationProvider) {
$routeProvider
        .when('/', {
            templateUrl: "../static/views/welcomeView.html"
        })

I have just pasted the code which I am using for view call. Let me know if its helpful or you guys need more details.

Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104

1 Answers1

0

Well, I found out the issue so thought to drop the answer as well so that It may be helpful for other newbies like me.

I was including js file in my view ealier (which was working completely fine when run as a separate page using Tomcat) , but as soon as I integrated with Django I had to remove all js file path from <script> tag and Bingo !!

Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104