0
단일 선택 중첩 트리을 Angular Components Example에서 구현하고 예제 코드가 선택한 값을 가져옵니다.다트 각 구성 요소 - 선택한 값의 전체 경로를 얻는 방법?
선택한 상위 그룹 제목뿐만 아니라 선택한 값으로 전체 경로를 가져 오려고합니다.
이것이 가능합니까? API 문서를 찾고 있었지만 아직 찾지 못했습니다.
예 :
이<material-tree
[options]="nestedOptions"
[expandAll]="expandAll"
[selection]="singleSelection">
</material-tree>
-
final SelectionOptions nestedOptions = new _NestedSelectionOptions([
new OptionGroup(
['Animated Feature Films', 'Live-Action Films', 'Documentary Films'])
], {
'Animated Feature Films': [
new OptionGroup([
'Cinderalla',
'Alice In Wonderland',
'Peter Pan',
'Lady and the Tramp',
])
],
'Live-Action Films': [
new OptionGroup(
['Treasure Island', 'The Littlest Outlaw', 'Old Yeller', 'Star Wars'])
],
'Documentary Films': [
new OptionGroup(['Frank and Ollie', 'Sacred Planet'])
],
'Star Wars': [
new OptionGroup(['By George Lucas'])
],
'By George Lucas': [
new OptionGroup(
['A New Hope', 'Empire Strikes Back', 'Return of the Jedi'])
]
});