I'm using AngularJs with templating system. I want to add specific inline javascript script to each template adding alert box regards to the selected tab ( Home | List | Settings )
Html renders : but ng-scope is added and nothing alerts when you change of tabs.
<script type="text/javascript" class="ng-scope">alert("home")</script>
I make the example available here :
or here
plunkr example with alert("template1") present into template1.html but renders as
<script type="text/javascript" class="ng-scope">alert("template1")</script>
I have improved endorama's solution at github
The same process.
in your app use 'ngLoadScript' as a resource dependency.
var app = angular.module('YOUR_APP_NAME', ['ngResource','ngRoute', ...,'ngLoadScript']);
In your partial use 'text/javascript-lazy' as the MIME type.
Everything should work as required: