Skip to main content
deleted 12 characters in body
Source Link
Maxdow
  • 1k
  • 11
  • 22

InitIn your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

An example : http://jsfiddle.net/maxdow/6GU6x/

Init your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

An example : http://jsfiddle.net/maxdow/6GU6x/

In your directive bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

An example : http://jsfiddle.net/maxdow/6GU6x/

added 43 characters in body
Source Link
Maxdow
  • 1k
  • 11
  • 22

Init your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

An example : http://jsfiddle.net/maxdow/6GU6x/

Init your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

Init your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>

An example : http://jsfiddle.net/maxdow/6GU6x/

Source Link
Maxdow
  • 1k
  • 11
  • 22

Init your directive you could bind your attribute with ngModel :

app.directive('myDirective', function() {
  return {
  restrict: 'AE', 
  scope: {
    myModel: '=ngModel'
  },
  template:'<input ng-model="myModel"/>'
}});

You should be able to use is from your HTML like this :

<my-directive ng-model="whatyouwant"></my-directive>