- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 06:06 AM
Hi All,
Below HTML will be added in left nav as shown
<div>
<label class="container" ng-repeat="task in data.iterativeTasks">
<div class="result-id">
<p>Project Id:</p>
<div class="result" ng-click='c.AddManualTask(task.catalog_id)'>{{task.name}}</div>
</div><br>
<div class="result-id">
<p>Created on:</p>
</div>
<div class="result">{{task.catalog_id}}</div>
<input type="radio" checked="checked" name="radio">
<span class="checkmark"></span>
</label>
</div>
On click of Project Id it will go to another URL,
function($location) { /* widget controller */ var c = this;
c.AddManualTask = function(catalogID)
{
$location.url('snappi?id=fr_plan_details&sys_id='+catalogID+'&mode=new&dynamic=false&snappi_id='+c.data.snappiId+'+&phase_id='+c.data.phaseId);
}
}
After click the page is getting refreshed and becomes like this,
On the whole, subcategories are closed. My question is, how to stop refreshing the page after changing the URL.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 09:55 AM
if you aren't changing portals, just try using this:
$location.search({
id: 'fr_plan_details',
sys_id: catalogID,
mode: 'new',
dynamic: 'false',
snappi_id: c.data.snappiId,
phase_id: c.data.phaseId
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2019 10:05 PM
Hi Jon,
URL is getting changed. But the content is not getting populated. It shows the previous page contents only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 01:34 PM
This is an awesome post, searched forever on how to create a new feedback record and redirect without a full refresh so our VA Chat Session wouldn't restart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2019 02:41 AM
Hi,
Please see the below link:
Service Portal, $location. Works on page reload only
You can also try the below code:
c.refresh = function(){
window .location.reload();
return;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2019 03:48 AM
But where to provide the URL here?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2019 01:28 PM
I wouldn't do a window.location.reload in an angular app. $location works on initial page load, just locationchangesuccess event may not work on initial page load.