angular-form-gen icon indicating copy to clipboard operation
angular-form-gen copied to clipboard

Successfully upgraded to 1.3.13

Open JoeGrasso opened this issue 10 years ago • 2 comments

Here are the changes I made to upgrade to 1.3.13:

I. Change the interpolateFn property:

     //1.3.13
          var parts = interpolateFn.expressions;          
     //1.2.x
         //var parts = interpolateFn.parts;

Per the docs:

$interpolate: due to 88c2193c, the function returned by $interpolate no longer has a .parts array set on it. Instead it has two arrays:

.expressions, -> an array of the expressions in the interpolated text. The expressions are parsed with $parse, with an extra layer converting them to strings when computed

.separators, -> an array of strings representing the separations between interpolations in the text. This array is always 1 item longer than the .expressions array for easy merging with it


II. Change the $templateCache's ng-pattern:

$templateCache.put
     ....

          // 1.2.x
          ng-pattern=\"/{{ field.schema.validation.pattern }}/\"

          // 1.3.13
          pattern="{{ field.schema.validation.pattern }}"
     ....

Note: I have not upgraded the code to reflect the new $validator for 1.3 form validation.

Hope this helps.

JoeGrasso avatar Feb 20 '15 13:02 JoeGrasso

@McNull can you please upgrade to Angular 1.3.x ?!

JoeyHoutenbos avatar Mar 18 '15 09:03 JoeyHoutenbos

this will be great, The fixes abouve helps, but doesnt full functional

spee65 avatar Mar 18 '15 09:03 spee65