In the master page n-bind-html is working but when calling view pages any data didnt get .
ng-bind-html="home.title" is working in the index header div.
index.html
....
<title ng-bind-html="home.title"></title>
....
<ng-view></ng-view>
contact.html but ng-view contact page ng-bind-html="home.title" not working and {{contact.info}} are not working.
<h4 ng-bind-html="home.title"></h4>
<p>{{contact.info}}</p>
controller:
$scope.trustedHtml = function (plainText) {
return $sce.trustAsHtml(plainText);
}
$http.get('admin/api/?s=getAbout&lang='+lang).success(
function(r){
$scope.about = r.text;
//$scope.about = r.email;
}
);
$http.get('admin/api/?s=getContact'+lang).success(
function(r){
$scope.contact = r;
//$scope.contacttext.infoH = r[0].infoH;
//$scope.contact.infoH = $sce.trustAsHtml(r.infoH);
}
);
$http.get('admin/api/?s=getHome&lang='+lang).success(
function(r){
$scope.home = r;
$scope.home.address = $sce.trustAsHtml(r.address);
$scope.home.phone = $sce.trustAsHtml(r.phone);
$scope.home.email = $sce.trustAsHtml(r.email);
$scope.home.title = $sce.trustAsHtml(r.title);
}
);
ng-view page of about is working . about.html
<div class="container" style="font-size:16px;" ng-bind-html="trustedHtml(about)"></div>