I have a question regarding including a new page using the nginclude directive. The click event defined in the included page is not working properly.
Main Application:
<div ng-app="">
<input type="text" ng-model="ss"/>
<div ng-include src="'include/page1.html'">
</div>
</div>
Page1.html:
<body>
<div id="a">{{ss}}</div>
<script type="text/javascript">
document.getElementById("a").addEventListener("click",function(){
alert("a");
})
</script>
</body>
Why is the event defined in page1.html not working in the main app? Can you help me understand if my approach is correct or incorrect...