include routeProvider as dependency in your module.
myApp.config(['$routeProvider',function($routeProvider){.

*Thanks & Regards*
_________________________
*Sunit Tomar**,*
*MetaDesign Solutions, Gurgaon*
Tel: +91-99-11-217009
Skype: mds_76
[email protected] | www.metadesignsolutions.com



*P* *please consider the environment before printing this e-mail*

On Thu, Dec 18, 2014 at 3:42 PM, surendra kumar <[email protected]>
wrote:
>
> //app.js
> var myApp=angular.module("firstApp",[]);
> myApp.config(function($routeProvider){
> $routeProvider.when('/',
>  {
> controller:"AppCtrl",
> templateUrl:"zippy.html"
>  })
>  });
> myApp.controller("AppCtrl",function($scope){
>
> $scope.model={
> message:"this is my app"
> }
>  });
>
>
> //main html page
> <body >
> <div  ng-app="firstApp">
> <ng-view></ng-view>
> </div>
> </body>
>
>
> //zippy.html
>
> <h1>{{model.message}}</h1>
>
>
>
> //console:
> app.js:1 Uncaught ReferenceError: $routeProvider is not defined
> angular.js:78 Uncaught Error: [$injector:modulerr] Failed to instantiate
> module firstApp due to:
> Error: [$injector:nomod] Module 'firstApp' is not available! You either
> misspelled the module name or forgot to load it. If registering a module
> ensure that you specify the dependencies as the second argument.
> http://errors.angularjs.org/1.2.27/$injector/nomod?p0=firstApp
>     at file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:78:12
>     at file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:1677:17
>     at ensure (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:1601:38)
>     at module (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:1675:14)
>     at file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:3877:22
>     at forEach (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:325:18)
>     at loadModules (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:3871:5)
>     at createInjector (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:3811:11)
>     at doBootstrap (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:1444:20)
>     at bootstrap (file:///C:/Users/manoj/Desktop/mytracker%20ui/
> 3liunXtXrI/angular/js/angular.js:1459:12)
> http://errors.angularjs.org/1.2.27/$injector/modulerr?p0=
> firstApp&p1=Error%…op%2Fmytracker%2520ui%2F3liunXtXrI%2Fangular%2Fjs%
> 2Fangular.js%3A1459%3A12)
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 


This e-mail message may contain confidential or legally privileged 
information and is intended only for the use of the intended recipient(s). 
Any unauthorized disclosure, dissemination, distribution, copying or the 
taking of any action in reliance on the information herein is prohibited. 
E-mails are not secure and cannot be guaranteed to be error free as they 
can be intercepted, amended, or contain viruses. Anyone who communicates 
with us by e-mail is deemed to have accepted these risks. Company Name is 
not responsible for errors or omissions in this message and denies any 
responsibility for any damage arising from the use of e-mail. Any opinion 
and other statement contained in this message and any attachment are solely 
those of the author and do not necessarily represent those of the company.

*P* *please consider the environment before printing this e-mail*

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to