AngularJs ngRoutes not working


I add this link tag <a href="#/pendingJobs"> And in Js wrote this type of when function

.when("/pendingJobs", {
    templateUrl : 'jobsPending.php',
    controller : 'appCtrl'

But when i click on link it create a url like that /#%2FpendingJobsdue to this linking problem .when("/pendingJobs" is not working..


Default value of the prefix is changed to to ‘!’.

I don’t know which angular version you are using.

But it should work with this changes.Change hashPrefix to ''

.config(function($locationProvider) {

More here

Answered By – RIYAJ KHAN

Answer Checked By – Katrina (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.