27
rated 0 times
[
29]
[
2]
/ answers: 1 / hits: 8086
/ 8 Years ago, wed, february 10, 2016, 12:00:00
In the controller if have a variable that tracks the index (starting at 0) of the page for a pagination table:
var page {
pageNumber: 0;
}
Question: how can I show this pageNumber
variable in the html, but always incremented by +1? (as the index=0 page is obviously the 1st page and should thus be shown as Page 1
)
<input type=text ng-model=page.pageNumber>
Also, when the model gets updated, the value in the input should automatically change (again: also incremented by +1).
More From » angularjs