I'd like to show the number of the currently selected page and number of all pages in iron-pages (e.g. "page 1 of 100").
Getting the former is easy as you can look for the selected-changed
event. For the latter I have no idea how to get it. I was considering getting the number of child elements in iron-pages
, but that doesn't seem to be reliable.
What you can do is make sure every page has a corresponding number as attribute. You can get the number of pages by evaluating child elements (ignoring the fallback page).
A working example: