You must make these modal states as child states of contacts and settings pages. In this scenario, your url will be business / 6 / contacts / checkout and business / 6 / settings / verification respectively. You must have some identifier in your URL to separate the two cases. Otherwise, when you enter a page directly from a URL, you cannot distinguish between these two cases if you use the same URL.
Here is an example:
var checkoutStateObject = {
url: '/checkout'..,
controller:"CheckoutModalCtrl"
};
yourApp.state("business", {
url: "/business/:businessId"...})
.state('business.contacts', {
url: '/contacts'..
})
.state('business.settings', {
url: '/settings'..
})
.state('business.contacts.checkout', checkoutStateObject)
.state('business.settings.checkout', checkoutStateObject)
source
share