Update ng-bind-html content dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:50 AM - edited 03-04-2024 04:54 AM
Hello experts,
I'm trying to fulfil a custom functionality which will change page content dynamically based on value which is looking for the matched html field in a table. the content should be changed on title click.
The issue is the html is renderd correctly only on at the first click.
So, If the user will click of another title, the html will stay on the initial click value.
HTML
<div class="wrapper">
<div class="project-sidebar">
<a class="filter-links"
ng-repeat="tite in data.KB"ng-click="onClick(tite.title)">{{tite.title}}</a>
</div>
</div>
<div ng-bind-html="::data.con">
</div>
<!--div ng-bind-html="::data.con">
</div!-->
Client script:
api.controller=function($scope) {
/* widget controller */
var c = this;
$scope.onClick = function(name){
//alert(name);
c.data.title = name;
c.server.update();
}
};
Server script:
Any suggestion how to modify the code so it will work?
Thank you,
Tomer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 02:10 AM - edited 03-05-2024 02:10 AM
are you getting the logs in browser console ? when clicking the button ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 02:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:32 AM
Hi, encountering same issue. Did you solve this problem?