title: Upload file creating directive with AngularJs
body: <p>I want to create a my directive for read the input type="file" but I fail in this problem. I write the my code in page html in this way:</p>
  
  <pre><code>&lt;body ng-controller="insertController"&gt;
      &lt;div&gt;
          &lt;input type="file" file-model="myFile"/&gt;
      &lt;/div&gt;
      &lt;div&gt;
          {{message}}
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>So I want read the file and show the result in {{message}}. So I created a directive in this way:</p>
  
  <pre><code>modulo.directive('fileModel', function() {
      return {
          restrict: 'AEC',
          templateUrl: 'insert.html',
          link: function(scope, element, attrs) {
              scope.message = attrs.fileModel;
          }
      };
  });
  </code></pre>
  
  <p>Moreover I read my controller but it's empty...</p>
  
  <pre><code>modulo.controller('insertController', function($scope, $http) {
  
  });
  </code></pre>
  
  <p>How can I fix the problem?Thanks!</p>