I'm using Angular to design the front end of an app, whose content will be dynamically updated based on the contents of a back end database. The database would be accessed through a server that I will use AJAX on to get the data from. My issue is with two things.
The first needs a bit of explanation as to how the website would be structured. In one of the views there's a lot of categories. You can go to a category, which can in turn have another set of categories, and then another and another and so on to infinity... The front end will only get one level at a time - just an array of names and descriptions to display.
I have absolutely no idea how to do that in ngRoute or UI Router.
Then I'll need to have breadcrumbs that route back to the previous views, they need to display the names of the categories you have been through, but the URL is supposed to have the representative IDs of the categories.
An example would be xxx.com/categories/categoryId/categoryId/categoryId/something else
Here's how one category would look:
{
"id": "4",
"name": "AppServers",
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
}
Thanks in advance and do excuse the noobiness, I'm new to web development.
Edit: only thing left now is the breadcrumbs. Currently I'm trying to use this:
But my breadcrumbs still don't work. In case anyone needs my route configuration (I'm running in html5mode):
$routeProvider.
when('/home', {
templateUrl: '/components/home/home.html',
controller: 'HomeController'
}).
when('/categories', {
templateUrl: '/components/categories/categories.html',
controller: 'CategoriesController'
}).
when('/categories/:categoryId', {
}).
when('/requests', {
}).
when('/requests/:requestId', {
}).
when('favorites/:favoriteId', {
}).
when('templates/:templateId', {
}).
when('/modify', {
}).
otherwise({
redirectTo: '/home'
});