title: How to pass multiple attribute in AngularJS directive
body: <p>How to pass multiple attribute to a directive.
  How to pass  value 12 of click-to-edit1  inside below div like </p>
  
  <pre><code>&lt;div click-to-edit="location.state" click-to-edit1=12&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and should be accessible in directive controller.please help me out.</p>
  
  <p><strong>Code:</strong></p>
  
  <p>App HTML:</p>
  
  <pre><code>&lt;div ng-controller="LocationFormCtrl"&gt;
      &lt;h2&gt;Editors&lt;/h2&gt;
      &lt;div class="field"&gt;
          &lt;strong&gt;State:&lt;/strong&gt;
          &lt;div click-to-edit="location.state"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
         &lt;h2&gt;Values&lt;/h2&gt;
      &lt;p&gt;&lt;strong&gt;State:&lt;/strong&gt; {{location.state}}&lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>App directive:</p>
  
  <pre><code>app = angular.module("formDemo", []);
  
  app.directive("clickToEdit", function() {
      var editorTemplate = '&lt;div class="click-to-edit"&gt;' +
          '&lt;div ng-hide="view.editorEnabled"&gt;' +
              '{{value}} ' +
              '&lt;a ng-click="enableEditor()"&gt;Edit&lt;/a&gt;' +
          '&lt;/div&gt;' +
          '&lt;div ng-show="view.editorEnabled"&gt;' +
              '&lt;input ng-model="view.editableValue"&gt;' +
              '&lt;a href="#" ng-click="save()"&gt;Save&lt;/a&gt;' +
              ' or ' +
              '&lt;a ng-click="disableEditor()"&gt;cancel&lt;/a&gt;.' +
          '&lt;/div&gt;' +
      '&lt;/div&gt;';
  
      return {
          restrict: "A",
          replace: true,
          template: editorTemplate,
          scope: {
              value: "=clickToEdit",
          },
          controller: function($scope) {
              $scope.view = {
                  editableValue: $scope.value,
                  editorEnabled: false
              };
  
              $scope.enableEditor = function() {
                  $scope.view.editorEnabled = true;
                  $scope.view.editableValue = $scope.value;
              };
  
              $scope.disableEditor = function() {
                  $scope.view.editorEnabled = false;
              };
  
              $scope.save = function() {
                  $scope.value = $scope.view.editableValue;
                  $scope.disableEditor();
              };
          }
      };
  });
  </code></pre>
  
  <p>App controller:</p>
  
  <pre><code>app.controller("LocationFormCtrl", function($scope) {
      $scope.location = {
          state: "California",
  
      };
  });
  </code></pre>