- Output links with a particular path structure according to a pattern
- Interpret the path of the current address to apply filters to a search.
Add a Detail Page
Add a Detail Page
- 
Add the following route to your routes.jsorsearch.routes.js:
- 
Create a view called search-detail.html.
- 
Ensure that your controller, search.controller.jsormain.js, contains the line,$scope.params = $stateParams;. Also, ensure that$stateParamsis injected into your controller.
- 
Add a search:querytag in yoursearch-detail.htmlpage that contains a nested filter with the ID parameter passed in the URL as the filter:
- 
In your result, set your URL to link to the new detail page. Use that result’s ID as a parameter:
Invalid characters in the URL
If your ID includes non URL safe characters, you will need to create a new unique ID field with these characters removed.You can refer to these in steps 4 and 5 by doing the following:Step 4mysite.com/search/id-of-the-document, it will load that page with the ID passed into the URL.