我在控制器中有以下部分代码:
$scope.open = function () {
$scope.modal = $fancyModal.open({
templateUrl: 'myModalContent.html',
themeClass: "ddd",
resolve: {
subcategories: function () {
return $scope.subcategories;
}
}
});
};
单击时会调用它。
因此,HTML模板文件是:
<div class="col-lg-12 content-white-background" id="settings-page" ng-controller="CategoryController">
<script type="text/ng-template" id="myModalContent.html">
<div id="modal-categories">
<div class="modal-header">
<h3>$$subcategories.title$$</h3>
</div>
</div>
</script>
</div>
为什么我在模板$$subcategories$$
中看不到变量myModalContent.html
?