I am building a directive that I will be using in several places in my application. It is a combination of a multi-select field and type-ahead. To pass data back and forth to the multi-select portion, I need to either use ng-model
or a scope property on which I will two-way bind.
Are there distinct advantages to using ng-model
over the two-way binding? Are there disadvantages?
I had to make a decision, so here is what I came up with. I ended up going with the simpler two-way-bind solution for now.
Here are advantages to using ng-model
ngModelOptions
to customize ngModel
behaviors. For example easy to use debouncing.Here are a few disadvantages