Im trying to include a file with ng-include, but it don't work. The file should be included when you press on a button:
<button type="submit" class="btn btn-primary" ng-click="getPartial()">Jämför</button>
Here is my function in the controller:
$scope.getPartial = function() {
$scope.showCompare = '../partials/compare.html';
console.log($scope.showCompare);
};
And here is my div:
<div data-ng-include data-ng-src="showCompare"></div>
Nothing is included. Have I done something wrong?