Skip to main content
deleted 89 characters in body
Source Link
user5320627
user5320627

how use an object to storeaccess the search string and instantiate it in the parent scope, which will make it available in both scopes for search filter inmodel inside your header directive using angularangularJS

     <div header showprofile="false" >
        <div class="searchView col-xs-12">
                  
                <input type="text" placeholder="Search" ng-model="search" />         
        </div>
    </div>
    <div class="divtop">
        <!-- <input type="text" placeholder="Search" ng-model="search" /> -->
        <div class="it-content col-xs-12 col-sm-12 col-md-12">
            <div ng-repeat="it in itBatch.its | filter: search" class="visit-card">
   
</div>
</div>
</div>

how use an object to store the search string and instantiate it in the parent scope, which will make it available in both scopes for search filter in using angular

     <div header showprofile="false" >
        <div class="searchView col-xs-12">
                  
                <input type="text" placeholder="Search" ng-model="search" />         
        </div>
    </div>
    <div class="divtop">
        <!-- <input type="text" placeholder="Search" ng-model="search" /> -->
        <div class="it-content col-xs-12 col-sm-12 col-md-12">
            <div ng-repeat="it in itBatch.its | filter: search" class="visit-card">
   
</div>
</div>
</div>

how to access the search model inside your header directive using angularJS

     <div header showprofile="false" >
        <div class="searchView col-xs-12">
                  
                <input type="text" placeholder="Search" ng-model="search" />         
        </div>
    </div>
    <div class="divtop">
        <!-- <input type="text" placeholder="Search" ng-model="search" /> -->
        <div class="it-content col-xs-12 col-sm-12 col-md-12">
            <div ng-repeat="it in itBatch.its | filter: search" class="visit-card">
   
</div>
</div>
</div>
Source Link
user5320627
user5320627

Angularjs search filter

how use an object to store the search string and instantiate it in the parent scope, which will make it available in both scopes for search filter in using angular

     <div header showprofile="false" >
        <div class="searchView col-xs-12">
                  
                <input type="text" placeholder="Search" ng-model="search" />         
        </div>
    </div>
    <div class="divtop">
        <!-- <input type="text" placeholder="Search" ng-model="search" /> -->
        <div class="it-content col-xs-12 col-sm-12 col-md-12">
            <div ng-repeat="it in itBatch.its | filter: search" class="visit-card">
   
</div>
</div>
</div>