Dynamically added attribute doesn't work in angularjs -


i have simple form 2 input boxes of number type. when try add max attribute via directive, seems ignore , doesn't validates although attribute added on dom element. when add inline works.i referred question angularjs can't read dynamically set attributes did'nt seemed me.new in angularjs , clueless.

any appreciated.

edit: updated fiddle demo http://jsfiddle.net/tnunh/6/

didn't furthuer, 1 solution have recompile element everytime change max value.

just change inject $compile (module.directive('type', ['$compile', function ($compile) {) , after attr.$set('max', '100') call $compile(element)(scope).

this doesn't seem right, i'd need further input directive code see if exposes way change without recompiling.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -