Answer the question
In order to leave comments, you need to log in
pagination angular how to implement?
I am a beginner user of angular js, trying to figure out how to pass variables in pagination. I mastered the navigation itself as it is written here https://webref.ru/dev/angular-cookbook/routing
, everything is clear here, but I can’t find anywhere how to transfer information from page 1 to page 1-2 or deeper, something like bread crumbs. For example, on the main page there are 2 categories Car services and Restaurants. Clicking on Car Services takes me to a page with the heading Car Services and a list inside. Now deeper - I click on one of the car services inside the list and I get to the personal page of the car service. Here is such a simple example that needs to be implemented, I can’t find an example on the Internet, tell me what to read.
Answer the question
In order to leave comments, you need to log in
I don’t want to seem overly categorical, but still I strongly recommend looking towards https://github.com/angular-ui/ui-router
They may have finished the native router now, but here everything is thought out to the smallest detail. You can just safely do nested states and other things, and automatic highlighting of the route tree out of the box.
here is a small example:
.state('app.discussions.categories.posts.new', {
title: 'Создание нового обсуждения',
url: "/new",
views: {
[email protected]': {
controller: 'DiscussionCreateCtrl',
templateProvider: function ($templateFactory) {
return $templateFactory.fromCacheOrUrl('...../discussion-create.html');
}
},
}
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question