Geeks With Blogs
Deeksha Sharma
DO NOT GET VALUES FOR DROPDOWN WHICH IS COMMON FOR ALL FUNCTIONS INSIDE CONTROLLER.

TO do this, just get values from service inside function and simple show and hide dropdown .otherwise it will not show dropdown and bind with other controls. 


   $scope.CustomerDropDownforPayment = false;
    $scope.SupplierDropDownforPayment = false;


  $('body').on('change', '#SelectTypePaymentReport', function () {
            var selectPaymentId = $('#SelectTypePaymentReport').val();
            if (selectPaymentId == 0)
            {
                $scope.Customerss = customerService.getCustomers();
                $scope.CustomerDropDownforPayment = true;              
            }
            if (selectPaymentId == 1)
            {
                $scope.Supplierss = supplierService.getSuppliers();
                $scope.SupplierDropDownforPayment = true;
                $scope.CustomerDropDownforPayment = false;
            }

        });
Posted on Friday, July 18, 2014 10:30 AM | Back to top


Comments on this post: How to show and hide drop down in angularjs

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Deeksha Sharma | Powered by: GeeksWithBlogs.net