Answer the question
In order to leave comments, you need to log in
What's wrong with routing in Angular?
Hello, tell me what to fix, otherwise on the forums in the solution, only adding the file
angular-route.js and registering 'ngRoute' in the module. I added the file, registered it in the module ..
Actually, here is a piece of code:
var app = angular.module('Flapper', ['ngRoute']);
app.config(['$routeProvider', function($routeProvide){
$routeProvide
.when('/',{templateUrl: '/partials/show.html', controller: 'addAppCtrl'})
.when('/view/:id',{templateUrl: '/partials/view.html' , controller: 'viewCntrl'})
.otherwise({redirectTo:'/'});
}]);
Answer the question
In order to leave comments, you need to log in
https://docs.angularjs.org/error/$injector/modulerr
check again if your angular-route or any other module you are using is loaded. Perhaps the application is initialized before the module is loaded.
app.config(['$routeProvider', function($routeProvide){
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question