I'm building a small AngularJS application. I have two views: employeeListView, which shows a list of all the employees, and employeeView, which show details about a specific employee. Each one has a corresponding contorller.
I want my app to be RESTful, meaning the URL of employeeListView should be #/employees, and the URL of employeeView should be #/employees/12345. 12345 is just an example, it can be any other employeeId.
I found a solution for that in this question: AngularJS Restful Routing
The answer I want to adopt is the last one, which was answered by the user who had asked the question, and was marked as the accepted answer. It uses OOTB features of ui-router to make RESTful routing, rather than developing custom directive or the like.
The problem with that answer is that it's very generic and lacking a literal explanation, so I don't understand how to practically implement it.
Could someone please give me a literal explanation for that answer and an example how to implement it in my case (with the two employee views)?
Any help will be profoundly appreciated!