<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 在父级上

      Angular ui router ui-sref-active on parent(Angular ui 路由器 ui-sref-active 在父级上)

      <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 在父级上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                <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>

                • <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>

                          <tbody id='gFnQL'></tbody>

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