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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -