Hi friends,

I'm trying to generate directives on the fly using *$compile*, but I have 
no idea how to access to their methods defined into their controller from 
the object created.

Here is my small pieces of code:

from *my-panel-Controller*

...

      $scope.mytrace() { $log.debug('im from new panel'); }
      this.mytrace() { $scope.mytrace(); }

...


from *Creator-Directive-controller*

...
var newElement = $compile( "<my-panel></my-panel>" )( $scope );
$element.parent().append( newElement );

*newElement.mytrace(); // wrong , it's undefined*

...

*newElement *it have no access as an object to the special methods like 
*mytrace*. Maybe Im using the incorrectly object, someone have any idea 
about how to access to the new created object from the 
*Creator-Directive-controller 
*environment?

Thanks in advance,
Antonio

-- 
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