title: What is the difference between scope and model within a directive definition in AngularJS
body: <p>I was wondering about the difference between <code>scope</code> and <code>model</code> within a directive.</p>
  
  <p>The following 2 directives behave exactly the same:</p>
  
  <pre><code>angular.module( 'exampleApp', [] )
  .directive( 'exampleDirective1', function() {
    return {
      restrict: 'E',
      scope: { // using scope here
        info: '='
      },
      template: '&lt;div&gt;&lt;span&gt;{{ info }}&lt;span&gt; &lt;input ng-model="info"&gt;&lt;/div&gt;'
    };
  } )
  .directive( 'exampleDirective2', function() {
    return {
      restrict: 'E',
      model: { // using model here
        info: '='
      },
      template: '&lt;div&gt;&lt;span&gt;{{ info }}&lt;span&gt; &lt;input ng-model="info"&gt;&lt;/div&gt;'
    };
  } );
  </code></pre>
  
  <p>Am I missing something?</p>