uhlryk / angular-dynamic-number

Highly customizable angular directive for numbers
64 stars 32 forks source link

Angular dynamic number not working with AngularJs version 1.2 #39

Closed impressico closed 7 years ago

impressico commented 7 years ago

Hi,

My application is developed using AngularJs version 1.2. When I tried to use the dynamic number directive it generates some regular expression issue.

Pls let me know if there is any fix that can solve my problem.

Thanks

uhlryk commented 7 years ago

Hi I recall the problem. This is in more details here https://github.com/angular/angular.js/issues/13068 Between angular 1.2.x and angular >1.3 ngModelController.$viewValue and ngModelController.$setViewValue behaves differently. For newer versions I have to use ngModelController.$setViewValue. But for angular 1.2 it can work correctly only with ngModelController.$viewValue.

uhlryk commented 7 years ago

I can in directive check angular version and use correct ngModelController set view property/method. ETA: I will do it in this week

uhlryk commented 7 years ago

Hey. Please check latest version. I have added condition with version check. Now it should work for 1.2.x where x>0 (version 1.2.0 has some problem with showing version but 1.2.1 and greater should work).