交易模板$routeProvider后的侧边栏不起作用
Sidebar not work after trade template $routeProvider
在$routeProvider上交易模板后侧边栏不起作用!点击交易模板后,没有打开菜单。
没有错误,只返回一个带有控制器名称的警告。
HTML其他HTML<!-- Sidebars --> <div ng-include="'menu.html'" ui-track-as-search-param='false' class="sidebar sidebar-left"></div> <div class="sidebar sidebar-right"><!-- ... --></div> <div class="app" ng-swipe-right='Ui.turnOn("uiSidebarLeft")' ng-swipe-left='Ui.turnOff("uiSidebarLeft")'> <div class="navbar navbar-app navbar-absolute-top"> <div class="btn-group pull-left"> <div ui-toggle="uiSidebarLeft" class="btn "> <i class="fa fa-bars"></i> Menu </div> </div> <!-- <div class="navbar-brand navbar-brand-center" yield-to="title"> <span>Login</span> </div>--> <!-- Top Navbar --> </div> <div class="navbar navbar-app navbar-absolute-bottom"><!-- Bottom Navbar --></div> <!-- App body --> <div class='app-body'> <ng-view class="app-content"></ng-view> </div> </div><!-- ~ .app --> <!-- Modals and Overlays --> <div ui-yield-to="modals"></div> <script src="lib/scripts/angular.min.js"></script> <script src="lib/scripts/angular-route.min.js"></script> <script src="lib/scripts/angular-touch.min.js"></script> <script src="lib/scripts/angular-resource.min.js"></script> <script src="lib/scripts/mobile-angular-ui.min.js"></script> <script src="lib/scripts/jquery-2.1.4.min.js"></script> <script src="cordova.js"></script> <script src="scripts/platformOverrides.js"></script> <script src="scripts/index.js"></script> <script type="text/javascript"> var app = angular.module('appindex', [ "ngRoute", "ngTouch", "mobileangular-ui", "mobile-angular-ui.core",
" mobile-angular-ui.components "
]);app.config(function ($routeProvider, $locationProvider) { $routeProvider.when('/unid', { templateUrl: "unid.html", controller: "unidController" // controller: "unidController" }); }); app.controller("indexController", function ($scope, $rootScope) { }); app.controller('unidController', function ($scope) { console.log("unidController") $scope.message = 'This is Show orders screen'; }); </script> </body> </html>
<h2>Add New Order</h2> {{ message }}
解决方案:需要放置"reloadOnSearch: false"。这样做对吗(最佳实践)??
感谢routeProvider美元。当(/unid, {templateUrl:"unid.html",控制器:"unidController",reloadOnSearch:假});
相关文章:
- 滚动后保持固定的菜单栏不起作用
- 固定位置侧边栏不滚动-设置内容的高度
- JQuery侧边栏在此jsfiddle中不起作用
- 响应式导航栏不起作用,品牌变得一团糟
- 元标记刷新在镶边中不起作用
- 具体化下拉列表和侧边导航不起作用
- 单击时侧边栏不起作用
- 位置和侧边栏不会显示在谷歌地图中
- 将jQuery转换为Angular,固定侧边栏不起作用(?)
- 拖放在镶边中不起作用
- 自动提交表单在镶边中不起作用
- 修复了位置导航栏不起作用的问题
- 在Meteor中实体化导航栏不起作用
- 使用javascript制作Exp栏不起作用
- 切换标签页时,窗口焦点在镶边中不起作用
- 侧边栏不会滚动超过其内容
- 链接在Angular应用中起作用,但地址栏不起作用
- 带偏移的侧边栏不起作用.我错了什么?
- 交易模板$routeProvider后的侧边栏不起作用
- 固定位置侧边栏不会调整到不同的分辨率