Angular and Laravel Partials

Posted: 2014-02-13 09:32:00

Blade uses {{ }} so it does not play well with Angular.js but I decided to use partials. I am not using Angular routes so I am just including partials in my controller file.

My blade file has this.

<div ng-include="template.url">&nbsp;</div>

Then the partial has this

<div class="issues-to-get" ng-show="issues.length > 0">
    <li><label><input type="checkbox" value="all" />All</label></li>
    <li ng-repeat="issue in issues"><label><input type="checkbox" value="{{ }}" />{{ issue.title }}</label></li>

The partial lives here


which / is the root of my Laravel app.

Finally my controller has this

$scope.template = { name: 'project_issues', url: '/assets/js/templates/project_show.html'};