<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # AngularJS路由問題解決 遇到了一個棘手的問題:點擊優惠詳情時總是跳轉到藥店詳情頁面中去。再加一層地址解決了,但是后來發現問題還是來了: Could?not?resolve?'yhDtlMaintain/yhdetail'?from?state?'yhMaintain' 藥店詳情[http://192.168.1.118:8088/lmapp/index.html#/0](http://192.168.1.118:8088/lmapp/index.html#/0) 優惠券詳情[http://192.168.1.118:8088/lmapp/index.html#/0](http://192.168.1.118:8088/lmapp/index.html#/0) 優惠活動詳情 [http://192.168.1.118:8088/lmapp/index.html#/index/0](http://192.168.1.118:8088/lmapp/index.html#/index/0) 經過url的對比,自己發現了問題。其中藥店詳情和優惠券詳情的url是相同的。而之前自己在優惠活動詳情中改動了一下,結果正常顯示。然后自己接著查看優惠活動的修改地方,發現: /*--------------------------優惠活動詳情維護--------------------------*/ ~~~ ???.state('yhhdDtlMaintain',?{ ???????url:?'/index/{yhid}', ???????views:?{?//注意這里的寫法,當一個頁面上帶有多個ui-view的時候如何進行命名和視圖模板的加載動作 ????????????'':?{ ???????????????templateUrl:?'rightInfoList.html' ???????????????}, ????????????'sys_banner@yhhdDtlMaintain':?{ ???????????????templateUrl:?'sys_banner.html' ???????????????}, ?????????????'rightContent@yhhdDtlMaintain':?{ ???????????????templateUrl:?function($stateParams){ ???????????????console.log("YHID:"); ???????????????console.log($stateParams); ???????????????return?'yh_set_dtl.html'; ????????????????}? ??????????????} ???????????} ????})? ~~~ 玄機藏在url中,其實這個url是在瀏覽器中訪問的url,基于用戶瀏覽該應用所在的狀態。同理,自己修改了優惠券詳情的路由,如下: /*-----------------------------優惠券詳情維護-----------------------------*/ ~~~ ??.state('yhqDtlMaintain',?{ ?????url:?'/yhqIndex/{yhid}', ?????views:?{?//注意這里的寫法,當一個頁面上帶有多個ui-view的時候如何進行命名和視圖模板的加載動作 ?????????'':?{ ?????????????templateUrl:?'rightInfoList.html' ?????????????}, ?????????'sys_banner@yhqDtlMaintain':?{ ??????????????templateUrl:?'sys_banner.html' ?????????????}, ?????????'rightContent@yhqDtlMaintain':?{ ??????????????templateUrl:?function($stateParams){ ??????????????console.log("YHQID:"); ??????????????console.log($stateParams); ??????????????return?'yh_set_dtl.html'; ??????????????}? ???????????} ????????} ?})?? ~~~ 這樣所有的問題就迎刃而解了。但自己還是需要深入理解一下相關原理。若之前不做修改的話,優惠券詳情的url就會與藥店詳情相同,藥店詳情頁面覆蓋了優惠券詳情頁面。 ? ? ?
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看