Hello, I'm using the same portion of html code in different parts of a page and I'd like to avoid duplicating it.
The only things that change are a few ones that can be parametrised. Reading here, I saw one option could be to use a directive: http://fdietz.github.io/recipes-with-angular-js/directives/rendering-an-html-snippet-in-a-directive.html Would this be the best approach? The snippet of code I'd like to use is not very short. I at first tried using ng-include with ng-init to set the parameters but this wasn't a good idea since I was changes them in the scope and so they where changing everywhere. (I saw that this works inside of a ng-repeat because then you have a different scope for it) Thanks. -- 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.
