I have the following code inside the view(partial) of AngularJS
<%@ page 
    pageEncoding="UTF-8"%>
<p>
some text
</p>
<script>
    $(document).ready(function(){ alert("WORKS");  }) 
</script>
I need it here and not in controller as later I want to implement Google Map. However the alert is not triggered. What may be the reason?
Relative part in the output HTML
    <div id="partials">
    <!-- ngView: --><div data-ng-view="" class="ng-scope">
<p class="ng-scope">
text
</p>
<script type="text/javascript" class="ng-scope">
    $(function(){ alert("WORKS"); });
        </script></div>
</div>