当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Why $formatter executes after $watch

问题描述:

I am changing the value of my model from controller. I went through this post AngularJS custom validation not firing when changing the model programatically. The issue is $formatter is executed after $watch is executed.Why is that happening. Is there any other way to bind from model to view so that $watch executes after the bind has happened from controller.

what i understood is $parsers executes in the pipeline of view to model and then $watch is triggered and $formatters executes in the pipeline of model to view after $watch has already executed.

But i want something like $formatter to be executed before $watch or any alternative to it.

分享给朋友:
您可能感兴趣的文章:
随机阅读: