【发布时间】:2014-08-08 08:48:42
【问题描述】:
我正在开发一个基于 angularjs 的应用程序,其中我有一些 jQueryUI 控件。我的页面有一个可折叠/可扩展的导航面板。单击它会展开并显示菜单并在再次单击时滑回(切换)但是当我使用角度页面执行此操作时,我的 url 会重定向到其他情况(默认页面)。如果我使用事件。 stoppropagation 我的 jQuery 控件停止工作并且切换功能不起作用。 我也尝试过 HTML 模式,但没有成功。下面是我的 app.js(用于路由)和 HTML,其中 MENU 调用菜单项的切换。任何想法都会有很大帮助。
$routeProvider
.when('/', {templateUrl: 'app/views/login.html', controller:'loginCtrl'})
.when('/overview', {templateUrl: 'app/views/overviewDashboard.html', controller:'overviewDashboardCtrl'})
.when('/changepassword', {templateUrl: 'app/views/changePassword.html', controller:'changePasswordCtrl'})
.when('/discoverysettings', {templateUrl: 'app/views/discoverySettings.html', controller:'discoveryCtrl'})
.when('/managedObject', {templateUrl: 'app/views/managedObject.html',controller:'managedObjectCtrl'})
.when('/search', {templateUrl: 'app/views/search.html'})
.otherwise({ redirectTo: '/overview' });
HTML 是
<aside class="left clear side-menu expanded">
<a href="#" target="_self" class="menu-controller" >MENU</a>
<nav role="navigation" class="side-nav">
<ng:include src="'app/views/sidebar.html'"></ng:include>
</nav><!-- end side-nav -->
</aside>
【问题讨论】:
标签: jquery angularjs jquery-ui