It sounds like you're accessing
field.model
via the attributes input parameter supplied to thelink
function in your directive. Instead, you should be accessing it via the scope variable.link: function(scope, element, attributes) { // attributes.ngModel will yield 'field.model' // scope.ngModel will contain the actual value of field.model }
If you don't explicitly define an isolate scope for your directive, then
ng-model
assigned tofield.model
should be available in your directive via the scope variable as I mentioned above.scope: false // This is the default // Define an isolate scope with field.model available through scope.ngModel scope: { ngModel: '=' }
Hope that helps.