저는 div가있는 각 템플리트가 있습니다. $ 시계를 기반으로 HTML보기 (.html) 페이지를 div에로드하려고합니다. 하지만, HTML 뷰를 div에로드하지 않습니다. 여기 내 컨트롤러입니다, 나는 단지 HTML보기를로드하는 코드 부분을 게시하고 있습니다.div에 HTML 페이지 추가
var filtertemplate = "#locationChart_right";
$scope.templateUrl = '/_layouts/AngularControls/MyController/Views/MyChart.html';
$scope.$watch("currentItem", function() {
$scope.currentConfig = $rootScope.currentItem;
LocDetailsChartService.getUserPrefs()
.then(function (response) {
var data = response.data.ChartsUserPrefs;
$scope.MeritType = data.MeritType;
if ($scope.MeritType !== undefined) {
if ($scope.MeritType == "Score") {
$(filtertemplate).load("/_layouts/AngularControls/MyController/Views/MyScoreChart.html");
}
if ($scope.MeritType == "Potential") {
$(filtertemplate).load("/_layouts/AngularControls/MyController/Views/MyPercentChart.html");
}
}
// $scope.radioButtonHandler($scope.MeritType);
});
});
여기 내 HTML입니다.
<div class="locationChart_container">
<div class="locationChart_left">
</div>
<div class="locationChart_right">
</div>
아무도 내가 실수를하고있는 곳을 제안 할 수 있습니다. 가능하다면이 일을하는 각도의 방법이 있다면 알려 주시기 바랍니다.
https://docs.angularjs.org/api/ng 변경의 각도 통지 코드에 추가/directive/ngInclude – XGreen