0
내 angularjs jquery fancytree 플러그 인을 사용하고있는 '활성화'이벤트를 $ 범위 안에 함수를 호출하는 데 사용하려고합니다. 코드를 중단하면 코드가 잘 보이지만 html에는 표시되지 않습니다.범위 안에 anglejs 바인딩
app.controller('ctrl', ['$scope', 'treeSvc', function ($scope, treeSvc) {
$scope.selectedNode = null;
$scope.SetSelectedNode = function(newNode){
$scope.selectedNode = newNode;
//a break point here shows that $scope.selectedNode is really changing but its not showing in the html. calling this function outside the fancy tree - works.
}
treeSvc.get()
.then(function (response) {
$("#tree").fancytree({
source: response.data,
activate: function(event, data) {
$scope.SetSelectedNode(data.node);
}
});
},
function() {
alert('error getting tree data');
});
}]);
HTML을
{{selectedNode | json}}
어떤 아이디어가 왜 여기
내 코드? 이벤트로
이 당신을 축복 !!!!!! – jinji