make sure your server knows what to do with that as well. Otherwise, the
server will 404 because it doesn't have a /redirect route in itself.

The server needs to be configured to put everything at the app's route and
below through to the app's index.html.

e


On Thu, Jul 31, 2014 at 10:17 AM, Ashutosh Das <[email protected]> wrote:

> My problem is url is not working without # . Here is my code :
>
> angular.module('Hiren', ['ngRoute']).config(function ($routeProvider, 
> $locationProvider) {
>     $routeProvider
>         .when('/', {
>             templateUrl: 'partials/login.html',
>             controller: 'login'
>         })
>         .when('/redirect', {
>             templateUrl: 'partials/postLogin.html',
>             controller: 'postLogin'
>         });
>
>     $locationProvider.html5Mode(true);});
>
> When I try to browse the url example.com/redirect , it gives me 404 , but
> using hash ( example.com/#redirect) its perfectly working .
>
> --
> 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.
>

-- 
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