Answer the question
In order to leave comments, you need to log in
Is it possible using Django + Angular to make transitions between views without reloading the page?
Good day. Please tell me, is it possible using Django + Angular to make transitions between views without reloading the page?
Angular config code:
.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/', {
controller: 'MyCtrl',
templateUrl: 'static/js/views/main.html'
})
.when('/profile/:id/', {
controller: 'TestController',
templateUrl: 'static/js/views/profile.html'
})
.otherwise({
redirectTo: '/'
})
url(r'^#/profile/(?P<pk>[0-9]+)/$', SingleProfileView.as_view(), name='single'),
<a ng-href='#/profile//'><p>Name: </p> </a>
Answer the question
In order to leave comments, you need to log in
Of course, it would be more correct to build the entire frontend on Angular, and give only data to Dzhang, without rendering. Another question is whether you need what you write then to SEO?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question