Wednesday, April 12, 2017

Trying to use angular 1.5 variable inside blade template engine

I'm using angular 1.5 and laravel 5.3, I have a controller which holds a questions array, and I also passing this array to the view. What I'm trying to do is:

<div ng-if="questions.length > 0">
            <md-card ng-repeat="question in questions">
                <md-card-content>
                    <h4><% question.title %></h4>
                    <p ng-bind-html="renderHtml(question.content)"></p>
                    <p></p>
                </md-card-content>
            </md-card>
        </div>

But its like the blade engine can't get the value of <% question.id %>. By the way, I changed angular from to <%%>. Thanks



via Shlomi Atia

Advertisement