javascript - Angular: I keep getting this error on injector modulerr -


i making angular app , keeps giving error:

uncaught error: [$injector:modulerr] http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=webinarapp&p1=error…0c%20(https%3a%2f%2fcode.angularjs.org%2f1.4.9%2fangular.min.js%3a19%3a463)

i have included cdn ngroute module, ngroute in app.module, defined new $route provider, included ng-view,

here code:

app.js

var webinarapp = angular.module('webinarapp', ['ngcookies', 'ngroute']);  webinarapp.config(function($routeprovider){     $routeprovider      .when('/', {       templateurl: './home.html',       controller: 'maincontroller'     })     .when('/signup', {       templateurl: './signup.html',       controller: 'maincontroller'      }) });  webinarapp.controller('maincontroller', ['$scope', '$http', '$cookies', function($scope, $http, $cookies){    $scope.welcomemessage = 'hello angular';   $scope.users = [];   $scope.searchquery = "";   $scope.orderbyfield = 'name';   $scope.newuser = {};   $scope.loginuser = {};   $scope.webinars = [];   $scope.newwebinar = {};   $scope.isdisabled = false;     // ============== users ================ 

index.html

<!doctype html> <html lang="en" ng-app="webinarapp">  <head>      <meta charset="utf-8">     <meta http-equiv="x-ua-compatible" content="ie=edge">     <meta name="viewport" content="width=device-width, initial-scale=1">     <meta name="description" content="">     <meta name="author" content="">      <title>find webinar</title>           <!-- custom css -->     <link href="css/grayscale.css" rel="stylesheet">      <!-- custom styles template -->     <link href="css/signin.css" rel="stylesheet">        <script src="//code.angularjs.org/1.4.9/angular.min.js"></script>     <script src="//code.angularjs.org/1.4.9/angular-route.min.js"></script>  </head>  <body ng-controller="maincontroller" id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">   <div class="container" ng-view></div>  </body>  </html> 

you misspelled service name:

$routeprovider 

should

$routeprovider 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -