jQWidgets Forums

jQuery UI Widgets Forums General Discussions Plugins AngularJS ng-click on minimized menu

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • ng-click on minimized menu #63970

    fpavlin
    Participant
    hi every body,
    
    i can't figure precisely why, on a jqxmenu when minimized at creation time bound ng-click events are not fired. It's ok when menu is not minimized.
    In the meantime the ng-href directive is properly working in both case.
    With the code below, one can check the behavior by enabling/disabling the line :
    $scope.menuSettings.apply('minimize');
    
    thanks for any help,
    
    fred
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="<?php echo JQWIDGETSBASE;?>/jqwidgets/styles/jqx.base.css" type="text/css" />
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript" src="<?php echo JQWIDGETSBASE;?>/jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="<?php echo JQWIDGETSBASE;?>/jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="<?php echo JQWIDGETSBASE;?>/jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="<?php echo JQWIDGETSBASE;?>/jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="<?php echo JQWIDGETSBASE;?>/jqwidgets/jqxangular.js"></script>
    
    <script type="text/javascript">
    	var testngApp = angular.module("testngApp", ["jqwidgets"]);
    	testngApp.controller("menugeneral", function ($scope) {
    		$scope.menuSettings = {
    			height : '200',
    			width: '150',
    			mode: 'vertical',
    			autoSizeMainItems : true,
    			itemclick: function(event) {
    				//	alert($(event.target).text());
    			},
    			shown: function(event) {
    				alert("menu shown " + $(event.target).text());
    			},
    			created : function() {
    				alert("menujqx created");
    				$scope.menuSettings.apply('minimize'); // comment this line
    				//$("#jqxmenugeneral").minimize(); doesn't work
    			}
    
    		};
    		$scope.loadMainContent=function(content){
    			alert("load content : " + content)
    		};
    	});
    </script>
    </head>
    <body ng-app="testngApp">
    <div ng-controller="menugeneral">
        <jqx-menu jqx-settings="menuSettings">
    		<ul&gt
    			<li ng-click="loadMainContent('testcontent')">Load content
    			<li><a>link1</a>&lt/li&gt
    		<
    	</jqx-menu>
    </div>
    </body>
    
    </html></li>
    ng-click on minimized menu #64012

    Peter Stoev
    Keymaster

    Hi fpavlin,

    The menu supports only the events available on its API Documentation page. I would suggest you to read it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    ng-click on minimized menu #64372

    fpavlin
    Participant
    thank you Peter.
    My thinking is about proper integration of your jqwidgets with angularjs, 
    for witch you've already done a great job.
    In this situation, some angular events properly link, but only when menu is not minimized.
    
    I'll bypass this problem and design the menu in another way.
    
    best regards,
    
    fred
    ng-click on minimized menu #64377

    Peter Stoev
    Keymaster

    Hi fpavlin,

    Our widgets only support the events documented on our website. They’re expected to work only with their API. We do not support API which do not belong to our widgets.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.