I am having a problem with my ng-bind-html expression, which may stem from the fact that I am not using curly braces, but instead using ** and @@ because I am using my angular in a laravel template, as such, I can't use curly braces. I get a lexer error in the ng-bind-html. Here is my code:
My app (that sets the alternate start and end symbols):
var app = angular.module('Mole', ['ngAnimate', 'ui.bootstrap'], function($interpolateProvider) {
$interpolateProvider.startSymbol('**');
$interpolateProvider.endSymbol('@@');
});
My controller:
$scope.slides= [{
id:1,
image:"",
content: $sce.trustAsHtml("<div id='chartContainer'></div>")},
{
id:2,
image:"",
content:""
},
{
id:3,
image:"",
content:""
}],
My HTML:
<div id="carouselContainer">
<uib-carousel interval="myInterval" no-wrap="noWrapSlides">
<uib-slide ng-repeat="slide in slides" active="slide.active" index="slide.id">
<img ng-src="**slide.img@@" style="margin:auto;">
<div class="carousel-caption">
<h4>Slide **slide.id@@</h4>
<div ng-bind-html="**slide.content@@"></div> <!--Error Here-->
</div>
</uib-slide>
</uib-carousel>
</div>
ng-bind-htmldon't need interpolatio directive to evaluate values, it works without it likeng-bind-html="slide.content"should workngSanitizein your module, so i don't think$sceis defined for you.Error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 15-15 [@] in expression [**slide.content@@].