Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/413.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript ui路由器:使用时出错<;用户界面视图>;在自定义指令中_Javascript_Angularjs_Angularjs Directive_Angular Ui Router - Fatal编程技术网

Javascript ui路由器:使用时出错<;用户界面视图>;在自定义指令中

Javascript ui路由器:使用时出错<;用户界面视图>;在自定义指令中,javascript,angularjs,angularjs-directive,angular-ui-router,Javascript,Angularjs,Angularjs Directive,Angular Ui Router,Im使用0.3.1版本的ui路由器 我的自定义指令中有标记 <div > <button type="button" class="btn btn-primary btn-circle btn-lg pull-left" ui-sref="users.adduser"><i class="fa fa-plus"></i></button> </div> <ui-view></ui-view>

Im使用
0.3.1
版本的
ui路由器

我的自定义指令中有
标记

<div >
    <button type="button" class="btn btn-primary btn-circle btn-lg pull-left" ui-sref="users.adduser"><i class="fa fa-plus"></i></button>
</div>

<ui-view></ui-view>
用户界面路由器有什么问题?这是版本
0.3.1
中的
错误吗


如果不是我做错了什么

ui路由器github repo将其报告为bug()。在我的例子中,我使用的是0.3.1版本,我的代码是这样的

<body>
  <div ui-view></div>

     <div ui-view>  //sub ui-view
         //content
     </div>      
</body>

我认为GitHub链接与您遇到的问题无关。你会用requireJS或类似的东西动态加载脚本吗?@CobusKruger是的,这是不相关的,我编辑了我的问题,我的错误。不,我没有使用requireJs,而是使用gulp将所有js文件合并成一个。我的应用程序正在控制台中处理此错误。我以类似的方式使用Grunt,没有理由不工作。您是否检查了文件的连接顺序?应该是jQuery,然后是Angular,然后是UI路由器,然后是任何指令、服务和控制器,然后才是引导Angular的模块。
<body>
  <div ui-view></div>

     <div ui-view>  //sub ui-view
         //content
     </div>      
</body>
<body>
      <ui-view></ui-view>

         <div ui-view>  //sub ui-view 
             //content
         </div>
      </div>
    </body>