Hey tomw,

What is the scope that you set? I assume you are  defining this inside a 
directive.

On Sunday, November 9, 2014 1:17:56 AM UTC+8, tomw wrote:
>
> Hi, 
>
> I'm trying to pass some values after dynamic creation of a new element.. 
> The new element is created in a directive like this:
>      
>  template = $templateCache.get('/partials/event.html').trim()
>  event = $compile(template)(scope)
>  this.appendChild(event[0])
>
> The html looks like this:
>
>        
> <div class="event">
>   <div class="event-left"></div>',
>   <div class="event-right"></div>',
>   <div class="event-thumbnail">
>      <img ng-src="{{image}}" class="event-thumbnail-img">
>   </div>',
> </div>
>
>
> Now, my question is how do I pass any values, like the image source into 
> the new element right upon upon creation?
> How can I reference then these values later from the controller of the 
> parent element?
>
> thanks for your help
>
> tomw
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to