For some reason, I am having trouble including a file using ng-include. The file is supposed to be included when a button is pressed:
<button type="submit" class="btn btn-primary" ng-click="getPartial()">Compare</button>
This is the function in my controller:
$scope.getPartial = function() {
$scope.showCompare = '../partials/compare.html';
console.log($scope.showCompare);
};
And here is where I want the file to appear:
<div data-ng-include data-ng-src="showCompare"></div>
However, nothing seems to be included. Can anyone spot what I may have done wrong?