- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2018 11:20 PM
Hello together,
I have a small issue.
Is it possible to call a Client Controller Funkcion inside a Server Script?
My plan is to show the current page title in the Header. But the problem is that the header doesnt reload when I switch the Pages.
When I switch the Pages only the Server Script is reloading but not the client controller. So I was about to call the Client controller, which sets the Title in the Header, with a Server Script Call.
I would be glad for any help.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 12:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2018 11:45 PM
Hi
Please check the below link it may help you
https://community.servicenow.com/community?id=community_question&sys_id=d14503addbd8dbc01dcaf3231f9619f7
https://community.servicenow.com/community?id=community_question&sys_id=32f2c7a1dbd8dbc01dcaf3231f9619f8
https://community.servicenow.com/community?id=community_question&sys_id=d9e68fa5db1cdbc01dcaf3231f9619d0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 12:17 AM
This works: ng-bind
HTML:
<p id="portalTitle" style="margin: 0px" ng-bind="titleFct()"/>
<span id="portalDescription" class="description" ng-bind="descFct()"/>
Client Controller:
$scope.titleFct = function getTitle(){
if(!$rootScope.page.title.toUpperCase().includes("INDEX")){
return $rootScope.page.title;
}else{
return "";
}
};
$scope.descFct = function getDescription(){
if(!$scope.options.short_description && $scope.data.category){
return $scope.data.category;
}else{
return "";
}
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 12:21 AM
Oh Great,
Make your answer as correct it will helpfull for others
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 12:26 AM
I cannot set my own answer as correct...