Answer the question
In order to leave comments, you need to log in
Why doesn't angular-routes work?
I am running the application locally. I am using OpenServer.
routes.js:
angular.module('Todolist')
.config(function($routeProvider){
$routeProvider.when('/todolist', {
templateUrl: '/templates/list.html'
})
});
angular.module("Todolist", ['ngRoute']);
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
test
08/27/15 16:14:46
Apache/2.2.29 (Win32)
Answer the question
In order to leave comments, you need to log in
This .htaccess setting worked well for me
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/$
RewriteRule (.*) /#!/$1 [NE,L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question