title: AngularJS custom directives
body: <p>I'm creating template for text inputing using angular directives.
  Directive will receive 3 attributes: title, placeholder and model. 
  I need attribte model to be implemented into atribute ng-model in directive template.</p>
  
  <p>For example:
  if i create element with next attributes</p>
  
  <pre><code>&lt;ng-text-input model="test" title="First name" placeholder="First name"&gt;&lt;/ng-text-input&gt;
  </code></pre>
  
  <p>result will be next:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="col-sm-2 control-label"&gt;First name&lt;/label&gt;
      &lt;div class="col-sm-9"&gt;
          &lt;input ng-model="test" type="text" class="form-control" placeholder="First name"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And how can i use model "test" in parent scope?</p>
  
  <p>Thanks</p>
  
  <p>upadete after @Maxdow comment:</p>
  
  <p>directive declaration:</p>
  
  <pre><code>app.directive('ngTextInput', function(){
      return {
          restrict : 'AE',
          scope: {
              title: '@',
              placeholder : '@',
              myModel: '=ngModel'
          },
          templateUrl : 'ng-textInput.html'
      }
  });
  </code></pre>
  
  <p>template:</p>
  
  <pre><code>&lt;script type="text/ng-template" id="ng-textInput.html"&gt;
      &lt;div class="form-group"&gt;
          &lt;label class="col-sm-2 control-label"&gt;{{title}}&lt;/label&gt;
          &lt;div class="col-sm-9"&gt;
              &lt;input ng-model="myModel" type="text" class="form-control" placeholder={{placeholder}}&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>using:</p>
  
  <pre><code>&lt;ng-text-input ng-model="test" title="First name" placeholder="First name"&gt;&lt;/ng-text-input&gt;
  </code></pre>
  
  <p>but result is still:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
          &lt;label class="col-sm-2 control-label ng-binding"&gt;First name&lt;/label&gt;
          &lt;div class="col-sm-9"&gt;
              &lt;input ng-model="myModel" type="text" class="form-control ng-pristine ng-valid" placeholder="First name"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>What am i doing wrong?</p>