title: passing value of a variable to angularjs directive
body: <p>I am new to angularjs, I am learning directives, and I am trying to pass value to the directive but the thing was not working.</p>
  
  <p><strong>html</strong> </p>
  
  <pre><code>&lt;genericsearch objectType="tei_org" organisationSearch="organisationSearchEvent"&gt;&lt;/genericsearch&gt;
  </code></pre>
  
  <p><strong>directive</strong></p>
  
  <pre><code>directive('genericsearch', [function () {
  return {
        restrict: 'E',
        replace: true,
        scope: {
          objectType : '=',
  
        },
       controller: ['$scope','$element','$rootScope','SearchOrg','MapOrgs','$routeParams','DelOrgs','GetTemplateGroups','FetchOrgs', function($scope,$element,$rootScope,SearchOrg,MapOrgs,$routeParams,DelOrgs,GetTemplateGroups,FetchOrgs){
          $scope.getOrgs = function(objectType, event) {
            if(event.keyCode != 13){
              //$scope.Participants(data);
             $scope.organisationSearchEvent(objectType);
            }
          }
          $scope.organisationSearchEvent = function(filter,objectType){
            SearchOrg().fetch({'filter':filter, 'searchType':objectType}).$promise.then(
  
            function(value){
              $scope.orgList = value.data;
  
            },
            function(err){
  
            });
        }
     }],
      templateUrl : TAPPLENT_CONFIG.HTML_ENDPOINT[0]+'home/search.html'
  
  }
  }])
  </code></pre>