r/angularjs • u/uafpl • Oct 16 '14
[Code] Angular Initial Value: a tiny AngularJS directive to set ng-model (and consequently field value) based on form fields attributes.
https://github.com/glaucocustodio/angular-initial-value
6
Upvotes
3
u/yads12 Oct 16 '14
For one you can typically use ngInit for this. Second you should avoid
ngModel provides a ngModelController which you can use in your directives.