Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 2是否有办法访问动画元数据中的组件逻辑或元素样式值_Angular_Css Animations_Angularjs Animation_Angular2 Animation - Fatal编程技术网

Angular 2是否有办法访问动画元数据中的组件逻辑或元素样式值

Angular 2是否有办法访问动画元数据中的组件逻辑或元素样式值,angular,css-animations,angularjs-animation,angular2-animation,Angular,Css Animations,Angularjs Animation,Angular2 Animation,基本上我需要知道的是,有没有一种方法可以计算从递归树动态创建的组件的高度。 显然,我不能在元数据声明中使用树,但我可以在*ngStyle目录中计算树的高度,如下所示 <my-directory [directory]='childDirectory' *ngStyle={'max-height:calcMaxHeight(childDirectory)><my-directory> 可以使用“*”访问元素维度属性。 这篇文章解释了这一点

基本上我需要知道的是,有没有一种方法可以计算从递归树动态创建的组件的高度。 显然,我不能在元数据声明中使用树,但我可以在*ngStyle目录中计算树的高度,如下所示

<my-directory [directory]='childDirectory' *ngStyle={'max-height:calcMaxHeight(childDirectory)><my-directory> 

可以使用“*”访问元素维度属性。
这篇文章解释了这一点