Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • multiple angular app in one page

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 330
    Comment on it

    While working in jsp with some parts common in few pages and ran into a problem to attach multiple apps to a single jsp page. After doing lot of search I found this one the best solution. Create a new app and take all other apps as an parameter. Example:

    On jsp page -

    <script type="text/javascript">
    		var rootApp = angular.module('rootApp', ['loginApp','searchApp','autoCompleteApp']);
    </script>

    Now add the 

    ng-app="rootApp"

    on the top and you need not to add other app in ng-app, you can directly call controller defined in these apps as :

    ng-controller="loginController"
    ng-controller="searchController"
    ng-controller="autoCompleteController"

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: