I have created a directive in angular that has an user-id as attribute.
<my-directive user-id="123"></my-directive>
I want to use it in my profile page, but i get that id in my controller after an http call. So i have tried to use it like that:
<my-directive user-id="user.id"></my-directive>
But It loads before the user.id gets the value so its undefined. I should wait until the binding is done. I could watch user but like this it loads twice the directive. I hope i explained myself



ng-ifon the directive.