I am a bit new to AngularJS and currently I am building a site to show questions to user. A view should contain a question and next button - by clicking which user should be shown next question.
For this, I created one ng-view (using angular-router module) and invoking the same view again and again by providing next question content.
But I can't invoke the view in which currently I already am.
I tried angular-ui-router - $stateProvider too but same issue.
Just wanted to ask is there anything wrong in my design? Or is this even possible in angular-route or angular-ui-router? If not possible then please let me know what are the alternate ways to do this?
Thanks very much for your time and response.
EDIT: Code snippets.
$stateProvider
.state('question', {
url: '/question',
controller: 'questionCtrl',
templateUrl: 'views/question.html'
});
Start questions link:
<a ui-sref="question">Start questions</a>
Next question link:
<div><a ui-sref="question">Next Question</a></div>
Same goes for angular-route too, I had defined in proper way and used it to invoke properly.