javascript - Angular directives and server requests -
i'm wondering practice make http request fetch data inside angular directive? directive's behavior dependent on data.
so main complexity before it's compiled (to add special classes elements example).
thanks in advance!
imho directives should consume model, not get, post or manipulate model. make attribute in directive called 'src' or similar allow directive bind controller scope. in controller. have update $scope , therefore directive well.
Comments
Post a Comment