Basically my problem is I am using the substring method on the variable version for the result then to be used inside a URL using ng-href:
substring(0, 3)
version 9.1.0 = 9.1 (good)
version 9.2.0 = 9.2 (good)
version 9.3.0 = 9.3 (good)
..
version 9.10.0 = 9.1 (breaks here)
version 10.1.0 = 10. (breaks here)
As you can see eventually the substring method stops working, how can I fix this??