I needed angular to validate numbers in scientific notation format within number input fields.
In order to do this I replaced the following constant within angular.js file (line: 18652 v0.13):
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE]+[-]?\d+)?\s*$/;
//var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
Now values like 0.045e-10 are are accepted as numbers within inputs of the type "number".
I wish to do this from my app instead of from the angular.js file in order to not have to remember to change this again on update of the framework files.
I tried to simply overwrite in the first line of my main app controller like:
NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE]+[-]?\d+)?\s*$/;
But didn't work.
How can this be done?