Sorry, couldnt find an answer to this. I want to specify the ngModel attr 
string during compile phase.

Simplified directive:
app.directive('foo', function($compile, $parse) {
  return {
    restrict: 'A',
    priority: 100,
    compile: function(el, attr) {
*      attr.$set('ngModel', 'formData.email')*
      return function(scope, el) {}
    }
  }
}) 


While this works in terms of dom manipulation, it wont result in the 
correct model bindings.
The following markup wont show the formData.email value in the second input.
<input type="text" ng-model="formData.email">
<input type="text" foo>

I'd like to have this as a template-less directive...somebody's got an idea?

Thanks a lot!
Carsten

-- 
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/groups/opt_out.

Reply via email to