-1

I am working on an angularjs based app where I have some controls of jQueryUI. My page has a navigation panel which collapsible/expandable.on click it expands and show menu and slides back on click again(toggle) but when I do this with angular page my url redirects to otherwise(default page).If I use event.stoppropagation my jQuery controll stops working and toggle functionality doesn't work. I tried HTML mode as well but couldn't succeed . below is my app.js (for routing) and HTML where MENU invokes toggling of menu item. any idea would be great help.

$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 is

                <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>

1 Answer 1

0

Fortunately I got my answer at jQuery click events not firing within AngularJS templates.

replacing jQuery event in below format solved the problem .

$(document).on("click", ".clickme", function() {
  console.log("click");
});

and the html changes

<a href="#" target="_self" class="menu-controller">MENU</a>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.