Skip to content

Commit

Permalink
dynamic page ordering complete: added dynamic prevPage
Browse files Browse the repository at this point in the history
  • Loading branch information
bodom0015 committed Mar 14, 2016
1 parent add294a commit 5d20b88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion angular-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ angular
return wizard.currentPage.nextPage != null && wizard.currentPage.canNextPage();
};
wizard.prevPage = function() {
wizard.setCurrentPage(wizard.currentPage.prevPage);
if (angular.isFunction(wizard.currentPage.prevPage)) {
wizard.setCurrentPage(wizard.currentPage.prevPage());
} else {
wizard.setCurrentPage(wizard.currentPage.prevPage);
}
};
wizard.nextPage = function() {
var onNextPage = wizard.currentPage.onNextPage;
Expand Down

0 comments on commit 5d20b88

Please sign in to comment.