angularjs - angular function called before two way binding complete -
in custom angular directive i'm receiving method parameter. when user changes value in directive update directive's ngmodel , execute function.
apparently there usecase function passed uses ngmodel used directive. reason model doesn't update when function called, later.
is there way execute method once ngmodel's 2 way binding has taken place?
you check if ngmodel undefined in directive's update method.
function update(){ if(ngmodel !== undefined){ passedinfunction(); } }
Comments
Post a Comment