I have an AngularJS app that I'm trying to get working with a Rails rest api. I am to the point where all the javascript seems to be loading without errors, but some templates don't seem to be included properly when I use ng-include. Here is an example:
<div ng-include="'<%= asset_path('header.tpl.html') %>'"></div>
When this section loads, I never see any attempt to load the specified template in the browser console. Any suggestions as to why the template isn't getting requested?
You have conflicting single quotes.
If you need to dynamically change what will be in the ng-include, try setting the value programmatically and then just pass that variable to the ng-include.
<div ng-include="templatePath"></div>
<script>$scope.templatePath = "header.tpl.html";</script>
Later in the code you can change the value of $scope.templatePath to whatever other file you need.