advanced search - Create the controls dynamically using angularjs -
i new angularjs, can help me create dynamic controls advance search using angular js.
like have advance search button after click on basic filter controls should load , after click on + or - button dymanicaaly load filter controls "and" / "or" option.
we need below screenshot. datatype dropdown , select date alternative nowadays default search. if person clicks on advance search filter alternative come on screen. need add together 1 dropdown dynamic command , if drop downwards menu item suitable textbox start with, end should come, if item suitable date datepicker command should come . after user can add together more search conditions clicking on plus or minus button.
in controller have array containing filter options:
$scope.filters = []
add click on advanced search:
$scope.onadvancedsearchclick = function() { $scope.advancedsearch = true; $scope.onclickplus(); // add together initial item } $scope.onclickplus = function() { $scope.filters.push({text: 'some text', type: 'and'}); } $scope.onclickminus = function() { $scope.filters.pop(); }
then on view have ng-repeat loops on filters array , creates text input , "and/or" buttton each one.
i not sure if want and/or per row or top level control.
angularjs advanced-search
No comments:
Post a Comment