I reopen the thread as the solution given works at half. Now, My snippet is compiled with the controller, so that's ok.
But, when we edit the controller code, I need to see the changes in the view. In my project, the code changes are done from the ace editor. For now, that only works in the plunkr because it automatically reload the page for each changes in the code. I said hourra too early :\ maybe, we need the two directives to communicate with each other thanks to a controller, but I'm not sure how to do it. Le mercredi 19 février 2014 15:44:49 UTC+1, Pierre Marot a écrit : > > Hello, > > I have an application that contains slides for presentations and thing > like that. > > Each slide is represented by a html snippet and a javascript function > (the controller for that snippet). > > When loading a slide, a snippet containing the controller inside a script > tag are loaded. Then it needs to be compiled. > > There, It can't find my controller function when I compile with : $compile > (element.contents())(scope); > > This error is thrown : Error: [ng:areq] Argument 'ApplyCtrl' is not a > function, got undefined > > I made a quick plunkr to illustrate my problem. What do I do wrong ? > > http://plnkr.co/edit/KZYiFMwDErX8mx7gZu42?p=preview > > Thank you. > > Pierre > -- 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/groups/opt_out.
