angularjs - Incorrect ng-class output Jasmine Test Angular -


i'm testing angular directive use $compile create instance of directive in dom. markup element directive attached uses ng-class expression inside. special characters expression being turned "safe" equivalents.

<article my-directive     ng-class="(selecteditems.length > 1 && asset.selected === true) ? 'class1' : 'class2'">  </article> 

looking @ html output $compile in test:

'ng-class="(selecteditems.length &gt 1 &amp&amp asset.selected === true) ? class1: class2"'

this valid html :)

when $compile() or angular.element() string this

<article my-directive ng-class="(selecteditems.length > 1 &amp;&amp; asset.selected === true) ? 'class1' : 'class2'"></article> 

yo proper html.

some play-around issue: http://jsfiddle.net/ulfryk/vzz3x6py/


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -