title: AngularJS directive accept parameters
body: <p>I want to convert the following code into directive:</p>
  
  <pre><code>&lt;object type="image/svg+xml" data="../images/icons/apple.svg" class="icon"&gt;&lt;/object&gt;
  </code></pre>
  
  <p>So I could call it like:</p>
  
  <pre><code>&lt;sicon type="apple"&gt;&lt;/sicon&gt;
  &lt;sicon type="banana"&gt;&lt;/sicon&gt;
  &lt;sicon type="orange"&gt;&lt;/sicon&gt;
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>  .directive('sicon', function(){
      return{
        restrict: 'E',
        scope:{
          type: '=type'
        },
        template: '&lt;object type="image/svg+xml" data="../images/icons/'+type+'.svg" class="icon"&gt;&lt;/object&gt;'
      };
    })
  </code></pre>
  
  <p>But did not work</p>