How can i get rid of $parent in angular
问题 Here's Plunker I have an external template within in a controller with ng-include. It is shown and hidden based on click event of Button.It is working as required but with $parent in ng-include Template.Is there any other better way of doing this ? Html <body ng-controller="MainCtrl"> <div data-ng-include="'terms.html'" data-ng-show="otherContent"></div> <div ng-show="mainPage"> <p>Hello {{name}}!</p> <button data-ng-click="mainPage=false; otherContent=true">Link to some Content</button> <