私はこのコードを持っていますhttp://plnkr.co/edit/kiH0Ge?p=preview
<!doctype html>
<html ng-app="plunker" >
<head>
<meta charset="utf-8">
<title>AngularJS Plunker</title>
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<choice-tree ng-model="myTree" children="true"></choice-tree>
<hr />
$scope.myTree = {{myTree | json}}
</body>
</html>
パラメータcheckChildrenを追加しました
<choice-tree ng-model="myTree" checkChildren="true"></choice-tree>
次に、checkディレクティブで関数を条件付きで実行したい
if(scope.checkChildren === 'true')
checkChildren(choice);
しかし、それは機能しません。
孤立したスコープがあることは知っていますが、ツリーを構築する方法。