Hello
I have the following routing configuration:
app.config([
'$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
if (abp.auth.hasPermission('Pages.Tenants')) {
$stateProvider
.state('tenants', {
url: '/tenants',
templateUrl: '/App/Main/views/tenants/index.cshtml',
menu: 'Tenants'
});
$urlRouterProvider.otherwise('/tenants');
}
$stateProvider
.state('home', {
url: '/',
templateUrl: '/App/Main/views/home/home.cshtml',
menu: 'Home'
})
.state('about', {
url: '/about',
templateUrl: '/App/Main/views/about/about.cshtml',
menu: 'About'
})
.state('suppliers', {
url: '/suppliers',
templateUrl: '/App/Main/views/suppliers/index.cshtml',
menu: 'Suppliers'
})
.state('supplierDetail', {
url: '/suppliers/:id',
templateUrl: '/App/Main/views/suppliers/detail.cshtml',
menu: 'Suppliers'
});
}
]);
But it doesn't work for the supplier detail. The folowing url doesn't work and keep redirect me to the home page : <a class="postlink" href="http://localhost:4000/#/Suppliers/809d3d83-7cbd-e511-beea-6c8814f37e8c">http://localhost:4000/#/Suppliers/809d3 ... 8814f37e8c</a>
I'm beginner in angular and I'm sure it must be something stupid, but I can't find where the problem is. There is no error message in the log or in the browser console. I don't know where to look. I've looked the angular-ui routing documentation and I didn't find something to point me to the right direction.
am I missing something in the configuration? Thanks for your help.
5 Answer(s)
-
0
Your code seems true. I did similar thing here: <a class="postlink" href="https://github.com/aspnetboilerplate/eventcloud/blob/master/src/EventCloud.Web/App/Main/app.js#L26">https://github.com/aspnetboilerplate/ev ... app.js#L26</a> and it's working. Maybe your browser has cached the page. Always browse your application while developer tools (F12) open and check "disable cache while devtools are open" option.
-
0
Hi Paddyfink,
Did you ever solve it? I have the same issue here.
Thank you,
Erik
-
0
Hi,
Can you share your routing definition as well. Maybe we can findout something.
-
0
Hi
if you user Redis try to empty redis cache.
mat
-
0
Hi,
I solved it by empty the cache.