How to set some variable in angular scope from a jsp

  1. Inject it as a global and access via $window. For eg. have your server side .jsp render a script tag with a global var like
    <script type="type/javascript">
       var pass = 'whatevervalue';

and access it in your controller with $window

    angular.module('yourapp').controller('YourCtrl', $window){

Uday Ogra

Connect with me at and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *