You do not need entryId placeholder in state name, only in url
.state(‘newentry’, {
url: “/new-entry/:entryId”,
templateUrl: “new-entry.html”,
controller: ‘NewEntryCtrl’
})
You can go to this state with
$state.go(“newentry”, {“entryId”:123});
Actually I want to access New Entry screen by <a href="#/new-entry">New Entry</a> and Edit Screen by $state.go('newentry/:entryId',{entryId:123});. But it always redirect to default route.
As of now I have found a work around below, but would like to know correct way to handle this to avoid any duplicate code.