RE: Angular Js Injector Moduler erro when I use config for routes,

    Angular Js Injector Moduler erro when I use config for routes,, Can you some please help me what is the issue here

    HTML Code

    
    <!DOCTYPE html >
    
    <html data-ng-app="leelaapp" >
    <head>
    </head>
    <body>
    <ng-vew> </ng-vew>
    <script type="text/javascript"  src="assets/js/angular.min.js"></script>
    
    <script type="text/javascript" src="assets/js/angular-route.js"></script>
    <script type="text/javascript" src="assets/js/main.js"></script>
    </body>
    
    </html>
    

    Javascript code

    
    var leelaapp = angular.module('leelaapp', ['ngRoute']);
    var paramControllers = {};
    paramControllers.firstController = function ($scope){
    };
    leelaapp.controller(paramControllers);
    leelaapp.config(function ($routeProvider) {
    $routeProvider
    
    .when('/',
    
    {
    
    controller:paramController,
    
    templateURL:'xxxx1H.php'
    })
    .when('vsscomputers',
    
    {
    
    controller:paramController,
    
    templateURL:'xxxxxxxx1.php'
    })
    });
    
    

    Error screenshot

    RE: Angular Js Injector Moduler erro when I use config for routes,

    Angular Js Version

    /*
    AngularJS v1.5.0-rc.0
    (c) 2010-2015 Google, Inc. http://angularjs.org
    License: MIT
    */

    Paramesh Baby Asked on January 17, 2016 in Angular JS.
    Add Comment
    1 Answers

      By Arik Subagia

       (function( angular ){
      // i use javascript strict for more clean script
       
      'use strict';
      //this one only act as a setter
      /* Angular Js  Code Starts here */ 
      /**
      * Main AngularJS Web Application
      */
      var leelaapp = angular.module('leelaapp', ['ngRoute']);
      var paramControllers = {};
      paramControllers.firstController = ['$scope' , function( $scope ){
      }];
      paramControllers.secondController = [ '$scope' , function( $scope ){
      }];
      leelaapp.controller( paramControllers.firstController );
      leelaapp.config([ '$routeProvider' , function ($routeProvider) {
          
          $routeProvider
              .when('/',
              {
                  controller:'firstController',
                  templateURL:'homepage.php'
                  
              })
              
              .when('vsscomputers',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_vss_computers.php'
                  
              })
              
              .when('enventure',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_enventure.php'
                  
              })
              
              .when('atlassystems',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_atlas_systems.php'
                  
              })
              
              .when('manipalglobal',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_manipal_global.php'
                  
              })
              
              .when('myprogrammer',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_my_programmer.php'
                  
              })
              
              .when('talentpace',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_talent_pace_india.php'
                  
              })
              
              .when('entrepreneurship',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_entrepreneurship.php'
                  
              })
              
              .when('infiniteibm',
              {
                  controller:'firstController',
                  templateURL:'my_experience_in_ibm.php'
                  
              })
      }]);
      })( window.angular );
       
      Kid Answered on January 17, 2016.
      Add Comment

      Your Answer

      By posting your answer, you agree to the privacy policy and terms of service.