Hi I tried with # as well
http://localhost/#%2Fpage%2Feditorial1 Its not working. :( On Thursday, 10 July 2014 17:16:24 UTC+2, Mickey Vashchinsky wrote: > > Looks like this is a regular server request for a page on the sever. > > Do you have HTML5 enabled and <base> set? > > Try (with the #): http://localhost:80/#/page/editorial1 > <http://localhost/page/editorial1> > > On Thursday, July 10, 2014 4:50:52 PM UTC+3, Kunal Vijan wrote: >> >> Hi >> >> I have following code written in JS: >> >> var app = angular.module('myApp', ['ngRoute', 'filters', >> 'pasvaz.bindonce']); >> app.config(function ($locationProvider, $routeProvider) { >> $locationProvider.html5Mode(true).hashPrefix('!'); >> >> $routeProvider.when('/page/:pageName', { >> templateUrl: function(params) { >> $('body').addClass( trimLastNumber( toCamelCase(params.pageName) ) ); >> return '/views/'+ params.pageName +'.html'; >> >> >> }, >> reloadOnSearch: false >> }); >> >> $routeProvider.otherwise({ >> templateUrl: '/views/startpage.html', >> reloadOnSearch: false >> }); >> }); >> >> HTML: >> <body ng-app="myApp" ng-controller="MainCtrl" class="home"> >> <div class="container scrollFix" >> ng-include="'/views/header.html'"></div> >> <div class="container scrollFix mainView" ng-view=""></div> >> <div class="container scrollFix" >> ng-include="'/views/footer.html'"></div> >> >> But when I am browsing any page other than startpage page I face 404 >> error. Can you please help me out how to fix this. >> >> Error SummaryHTTP Error 404.0 - Not FoundThe resource you are looking >> for has been removed, had its name changed, or is temporarily unavailable. >> Detailed Error Information >> ModuleIIS Web CoreNotificationMapRequestHandlerHandlerStaticFileError >> Code0x80070002 >> Requested URLhttp://localhost:80/page/editorial1Physical Path >> C:\myFolder\page\editorial1Logon MethodAnonymousLogon UserAnonymous >> > -- 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.
