- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 10:14 AM
Hi,
We need to hide typeahead on one page in ESC portal header.
Have used ng-if="$sp.getParameter('id')!='this-page'" in the Header widget of ESC portal but this gives error and hides in all pages.
Also, tried fetching id in Server Side if page is 'this-page' then set a data.var = false and in html add it in ng-if where the widget is called. This has no effect, infact the variable always shows as undefined in log.
in ESC portal, there is a JSON which is defined to hide widget only for Homepage.
Is there as way 'this-page' could be included as well.
Appreciate your response.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 11:00 AM
Got answer
In ESC Theme Header - Client Controller - $scope.showSearchBar = false;
// hide on home page
if ((params && params.id && params.id === c.data.dashboardSuffix) || (params && !params.id && currentUrl.includes(c.data.portalSuffix)) || (c.data.idparam =="<Page>"))
$scope.showSearchBar = false;
else
$scope.showSearchBar = true;
}
Comment line : $scope.showSearchBar = true; - Which is available post above code
c.data.idparam - has value of current page id using $sp.getParameter("id) from server script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 11:00 AM
Got answer
In ESC Theme Header - Client Controller - $scope.showSearchBar = false;
// hide on home page
if ((params && params.id && params.id === c.data.dashboardSuffix) || (params && !params.id && currentUrl.includes(c.data.portalSuffix)) || (c.data.idparam =="<Page>"))
$scope.showSearchBar = false;
else
$scope.showSearchBar = true;
}
Comment line : $scope.showSearchBar = true; - Which is available post above code
c.data.idparam - has value of current page id using $sp.getParameter("id) from server script.