You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a problem with the actual implementation of each embedded directive (twitter, facebook, etc). The actual implementation doesn't allow me to set values coming from an ajax request into url, description and title attributes. To clarify the problem, assume I have this HTML fragment:
In that case, Twitter directive (for example) will rely on the values coming from the parent directive instead of using the values from this ajax call. Taking a look at the code, I figured out what the problem is. For example, somewhere in 02-facebook.js and inside the link function, we have:
But when the link function is called, my ajax call is still being processed and these values aren't available yet. To overcome this problem, you should use the scope two way binding feature for each attribute and use scope.watchGroup to wait until the values are set in these variables.
I'm gonna create a pull request with this implementation and send it to you soon.
The text was updated successfully, but these errors were encountered:
marloncarvalho
added a commit
to marloncarvalho/angular-social
that referenced
this issue
Jun 3, 2015
There's a problem with the actual implementation of each embedded directive (twitter, facebook, etc). The actual implementation doesn't allow me to set values coming from an ajax request into url, description and title attributes. To clarify the problem, assume I have this HTML fragment:
Now, consider the code below is somewhere inside the controller for the HTML fragment provided above:
In that case, Twitter directive (for example) will rely on the values coming from the parent directive instead of using the values from this ajax call. Taking a look at the code, I figured out what the problem is. For example, somewhere in 02-facebook.js and inside the link function, we have:
But when the link function is called, my ajax call is still being processed and these values aren't available yet. To overcome this problem, you should use the scope two way binding feature for each attribute and use scope.watchGroup to wait until the values are set in these variables.
I'm gonna create a pull request with this implementation and send it to you soon.
The text was updated successfully, but these errors were encountered: