找不到Ionic v1错误控制器ionNavBar

时间:2019-02-12 13:35:05

标签: angularjs ionic-framework ion-navbar

我正在重写我的应用程序初始化过程,并以某种方式引入了此错误,我一生都无法找到导致此错误的原因。它似乎并没有影响应用程序,但是显示任何错误都不是很好。

错误:

$ awk '
    BEGIN { FS="|"; OFS="\t"; print "", "K", "R", "KK", "RR" }
    /^>/ { v=$2; next }
    { print v, gsub(/[kK]/,"&"), gsub(/[rR]/,"&"), gsub(/[kK]{2}/,"&"), gsub(/[rR]{2}/,"&") }
' file
        K       R       KK      RR
Q96A73  7       11      0       0
P13674  17      13      1       2
Q7Z4N8  11      11      0       1
P04637  2       4       0       0

我的控制器呼叫:

ionic.bundle.js:20306 Error: [$compile:ctreq] Controller 'ionNavBar', required by directive 'ionNavTitle', can't be found!
http://errors.angularjs.org/1.3.13/$compile/ctreq?p0=ionNavBar&p1=ionNavTitle
    at ionic.bundle.js:8762
    at getControllers (ionic.bundle.js:16243)
    at nodeLinkFn (ionic.bundle.js:16411)
    at compositeLinkFn (ionic.bundle.js:15777)
    at publicLinkFn (ionic.bundle.js:15656)
    at boundTranscludeFn (ionic.bundle.js:15795)
    at controllersBoundTransclude (ionic.bundle.js:16455)
    at Object.ngIfWatchAction [as fn] (ionic.bundle.js:30647)
    at Scope.$digest (ionic.bundle.js:22942)
    at Scope.$apply (ionic.bundle.js:23205)

然后将控制器分配给我的页面:

.controller('RegisterCtrl', function($scope,$state,$timeout,$ionicPlatform,$ionicNavBarDelegate,$ionicModal,$q,$http,apiService) {

我经历了html的几次不同迭代,添加了导航栏,导航按钮相关的内容,以消除错误,但没有任何效果。

<ion-view>
  <ion-nav-title align-title="center">
    <div style="float:none;width:100%;text-align:center;" class="whipsterTitle">APP REGISTRATION</div>
  </ion-nav-title> 
  <ion-content>
     ...
  </ion-content>
</ion-view>

0 个答案:

没有答案