You could definitely update a js file as well.
All you need to do is add the path to the build files array, and include the 'BUILDNR' placeholder where you want the build number to be included.
When working with version and build numbers, they are usually handled separately. One is used to track releases (version numbers), and the other to track development versions (build).
We use hockeyApp to distribute our beta version, and they let us breakdown statistics and reports by version and build.
If you want to make it simple, you can always append the buildnr with a dot instead of a dash:
Where the build number is the last quintet. But yes, the plan is to move the buildnumber away from the version number all together.
The reason for using the config.xml file, is because that's where ionic/cordova retrives the info when including it in all the system files for the different platforms.