Make it clear enough, let's say I have created a directive 
"bootstrap-form-element", and I want to use it this way:

        <input ng-model="name" type="number" min-length=10 
bootstrap-form-element bt-label="Name:" bt-class="col-md-6" />
<select ng-model="type.id" bootstrap-form-element bt-label="Choose Type:" 
bt-class="col-md-12">
  <option ng-repeat="type in types" 
value="{{type.id}}">{{type.name}}</option>
</select>

Then I expect it would generate the following markups:

<div class="col-md-6>
  <div class="form-group">
    <label>Name:</label>
    <input ng-model="name" type="number" min-length=10 
bootstrap-form-element bt-label="Name:" bt-class="col-md-6" />
  </div>
</div>

<div class="col-md-12" 
   <div class="form-group">
    <label>Choose Type:</label>
<select ng-model="type.id" bootstrap-form-element bt-label="Choose Type:" 
bt-class="col-md-12">
 <option ng-repeat="type in types" 
value="{{type.id}}">{{type.name}}</option>
</select>
  </div>
</div>

And in a word, for a given matched element, I want to add it to a specified 
location in the template, and change the template style or attributes 
accordingly.


Is there any similar examples I can follow?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to