<tfoot id='KWQ9Q'></tfoot>

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

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

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

      <legend id='KWQ9Q'><style id='KWQ9Q'><dir id='KWQ9Q'><q id='KWQ9Q'></q></dir></style></legend>

      Angular ui 路由器 ui-sref-active 在父级上

      时间:2023-09-30

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

              <small id='4Qasj'></small><noframes id='4Qasj'>

                <tbody id='4Qasj'></tbody>

                <tfoot id='4Qasj'></tfoot>
              1. 本文介绍了Angular ui 路由器 ui-sref-active 在父级上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 父母 州和许多孩子州.如果我希望父母的 ui-sref-active 在我在其中一个孩子身上工作时,我需要做这个hack":

                I have one parent state and many childs states. If I want the ui-sref-active on the parent to work when I am on one of the child I need to do this "hack":

                $scope.isActive = function() {  
                   return $state.includes('playLotteries.Index') 
                       || $state.includes('playLotteries.Group')  
                       || $state.includes('playLotteries.hunter');
                   }
                

                这是非常丑陋的方式,而且我有很多孩子,所以这似乎不是一个好的解决方案.有人对这个问题有其他解决方案吗?

                This is very ugly way and I have many children so its not seems like good solution. Anyone have another solution for this problem?

                推荐答案

                你可以只检查parent state而不是检查all child states

                You can check parent state only instead of checking all child states

                $scope.isActive = function() {  
                   return $state.includes('playLotteries');
                }
                

                这篇关于Angular ui 路由器 ui-sref-active 在父级上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:$ionicHistory.backView 手动转到上一个状态时状态不正确 下一篇:如何在不本地保存的情况下将 base64 数据传输到可读的图像流中

                相关文章

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

              2. <tfoot id='gFnQL'></tfoot><legend id='gFnQL'><style id='gFnQL'><dir id='gFnQL'><q id='gFnQL'></q></dir></style></legend>
                  <bdo id='gFnQL'></bdo><ul id='gFnQL'></ul>

                1. <small id='gFnQL'></small><noframes id='gFnQL'>