-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination links conflicts with routing in AngularJS #50
Comments
Your app does routing by Angular ( by Thank you for reporting this issue. |
Thanks for response. I am only the one of contributors, but we are using for routing AngularUI Router: When I set in one of our module html5mode, pagination started to work like in example in your ngTasty homepage. In spite of all this change behaviour of whole routing in application. Config part of main app: angular.module('admin', dependencies).config([
'$stateProvider',
'$urlRouterProvider',
'RestangularProvider',
'$translateProvider',
'$translatePartialLoaderProvider',
function($stateProvider, $urlRouterProvider, RestangularProvider, $translateProvider, $translatePartialLoaderProvider) {
// ...
// For any unmatched url, redirect to /state1
$urlRouterProvider.otherwise('/');
// Now set up the states
$stateProvider
.state('home', {
url: '/',
templateUrl: viewPath + 'home.html'
});
// ...
}
]).run() Config part of content module: angular.module('admin.content', [])
.config([
'$stateProvider',
'$urlRouterProvider',
'RestangularProvider',
'$locationProvider',
function($stateProvider, $urlRouterProvider, RestangularProvider, $locationProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
// ...
// Now set up the states
$stateProvider
.state('content', {
url: '/content',
templateUrl: viewPath + 'index.html',
controller: 'ContentCtrl'
})
.state('content.list', {
url: '/list',
views: {
'': {
templateUrl: viewPath + 'list.html'
},
'quickNav': {
templateUrl: viewPath + 'quickNav.html'
},
'quickSidebarLeft': {
templateUrl: viewPath + 'categories.html'
}
}
})
.state('content.show', {
url: '/{contentId}/show',
templateUrl: viewPath + 'show.html'
})
.state('content.add', {
url: '/add',
templateUrl: viewPath + 'add.html',
controller: 'ContentCtrl'
});
}
]) I hope it helps ;-) If I made language mistakes, correct me ;-) |
I'm having the same issue and I just ask people from angularjs repo. I'll have you in touch. |
They just said it's our problem if is not working ahaha. <a href="#" ng-click="page.previous()">«</a> or do something like this <a href ng-click="page.previous()">«</a> I think the second could work better, here the pagination implementation of angular bootstrap |
So it will be changed on v0.3.3? And when will be released? I think it will be good to add an option to set a custom template for the pagination, some custom tables like ng-table does the same thing :) |
I double check the code, and yes... For the custom template for the pagination it's a good idea. |
Too much code every day :P PS: Pagination is very important for me, so if we can do a release as soon we have this feature it will be great. |
@MaciejSzmida Don't forget to give me a ⭐ :) |
Why not? :P Here you go ⭐ ;-) |
👍 |
When I click in pagination links Angular routes mi to '/' path of my application. This is due to href="#" attribute in links.
Why this problem does not occur on ngTasty homepage example of grid?
The text was updated successfully, but these errors were encountered: