angularjs - How to give a specific value to input with ' ng-model="searchQuery" '? -
i creating app using ionic framework , i'm facing problem.
i'd create search function tags. when click on button, value given input.
my code :
<div id="rech-btns" class="padding" ng-model="searchquery" ng-controller="rechctrl"> <button class="button button-outline button-balanced espace rech-text" ng-click="showdiv('facile')"> facile </button> <!-- there others buttons deleted them see whole code --> </div> <div id="rechrech"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> <!-- <input type="search" placeholder="recherche..." /> --> <input type="search" ng-model="searchquery"> <!--<input type="text" text="facile" ng-model="searchquery">--> </label> <div class="padding"> <button id="paramrech" class="button button-outline button-balanced espace rech-text"> <!-- value arrives here --> </button> </div>
i tried change value function doesn't work i'm asking :p
my function :
.controller('rechctrl', function($scope) { $scope.showdiv = function(param) { document.getelementbyid('rech-btns').style.display = "none"; //so when click, disappear document.getelementbyid('rechrech').style.display = "block"; //this appear document.getelementbyid("paramrech").innerhtml = param; //and here don't know change want }; })
do have idea ?
Comments
Post a Comment