We are use this approad to append an Id in AngularJS
.when(
'/fundingRequirements/:id',
{
templateUrl : '/views/dashboard/crowdFunding/planningFunding.html',
controller : 'planningFunding'
})
And then in Controller used this
$location.path("/fundingRequirements/"+data.data)
Now the problem occur that Firstly it is save then Id is generated at Server .So in this URL there is not an Id in URL , and in second case it is edit , so at that time there is the requirement of Id in URL . Does we need to make another URL or there is any approach to use same URL in both cases ??
Note - HTML Form , controller , server site all methods are same for both operation i.e. save, edit