<legend id='oemCj'><style id='oemCj'><dir id='oemCj'><q id='oemCj'></q></dir></style></legend>
      <tfoot id='oemCj'></tfoot>

      • <bdo id='oemCj'></bdo><ul id='oemCj'></ul>

      <small id='oemCj'></small><noframes id='oemCj'>

      1. <i id='oemCj'><tr id='oemCj'><dt id='oemCj'><q id='oemCj'><span id='oemCj'><b id='oemCj'><form id='oemCj'><ins id='oemCj'></ins><ul id='oemCj'></ul><sub id='oemCj'></sub></form><legend id='oemCj'></legend><bdo id='oemCj'><pre id='oemCj'><center id='oemCj'></center></pre></bdo></b><th id='oemCj'></th></span></q></dt></tr></i><div id='oemCj'><tfoot id='oemCj'></tfoot><dl id='oemCj'><fieldset id='oemCj'></fieldset></dl></div>

        调用后在 angularjs 中解绑 $watch

        时间:2023-10-11

        <small id='3jTqp'></small><noframes id='3jTqp'>

        • <bdo id='3jTqp'></bdo><ul id='3jTqp'></ul>
          <tfoot id='3jTqp'></tfoot>
                <tbody id='3jTqp'></tbody>

              <i id='3jTqp'><tr id='3jTqp'><dt id='3jTqp'><q id='3jTqp'><span id='3jTqp'><b id='3jTqp'><form id='3jTqp'><ins id='3jTqp'></ins><ul id='3jTqp'></ul><sub id='3jTqp'></sub></form><legend id='3jTqp'></legend><bdo id='3jTqp'><pre id='3jTqp'><center id='3jTqp'></center></pre></bdo></b><th id='3jTqp'></th></span></q></dt></tr></i><div id='3jTqp'><tfoot id='3jTqp'></tfoot><dl id='3jTqp'><fieldset id='3jTqp'></fieldset></dl></div>
              <legend id='3jTqp'><style id='3jTqp'><dir id='3jTqp'><q id='3jTqp'></q></dir></style></legend>

                1. 本文介绍了调用后在 angularjs 中解绑 $watch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我知道你可以像这样解除 $watch 的绑定:

                  I know you can unbind a $watch like this:

                  var listener = $scope.$watch("tag", function () {});
                  // ...
                  listener(); // would clear the watch
                  

                  但是你可以在 watch 函数声明中取消绑定手表吗?那么在手表执行一次之后,它会自行解除绑定吗?比如:

                  but can you unbind the watch within the watch function declaration. So after the watch gets executed once, it unbinds itself? Something like:

                  $scope.$watch("tag", function () {
                      unbindme()
                  });
                  

                  推荐答案

                  你可以像你已经做的那样做,在你的函数中调用取消注册":

                  you can just do it the same way you already do, call the "deregistration" inside your function:

                  var unbind = $scope.$watch("tag", function () {
                      // ...
                      unbind();
                  });
                  

                  这篇关于调用后在 angularjs 中解绑 $watch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 vuetify 中上传文件 下一篇:语义 ui 框架是否支持 rtl 语言?

                  相关文章

                  最新文章

                  <tfoot id='cwhW9'></tfoot>

                    <bdo id='cwhW9'></bdo><ul id='cwhW9'></ul>

                  <small id='cwhW9'></small><noframes id='cwhW9'>

                  <i id='cwhW9'><tr id='cwhW9'><dt id='cwhW9'><q id='cwhW9'><span id='cwhW9'><b id='cwhW9'><form id='cwhW9'><ins id='cwhW9'></ins><ul id='cwhW9'></ul><sub id='cwhW9'></sub></form><legend id='cwhW9'></legend><bdo id='cwhW9'><pre id='cwhW9'><center id='cwhW9'></center></pre></bdo></b><th id='cwhW9'></th></span></q></dt></tr></i><div id='cwhW9'><tfoot id='cwhW9'></tfoot><dl id='cwhW9'><fieldset id='cwhW9'></fieldset></dl></div>
                    1. <legend id='cwhW9'><style id='cwhW9'><dir id='cwhW9'><q id='cwhW9'></q></dir></style></legend>