File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
material.angular.io/material.angular.io/scenes/src/app/scene-viewer Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 11import {
22 Component ,
3- ComponentFactoryResolver ,
43 HostBinding ,
54 Input ,
65 OnInit ,
@@ -46,17 +45,15 @@ export class SceneViewer implements OnInit {
4645
4746 readonly scene = viewChild . required ( 'scene' , { read : ViewContainerRef } ) ;
4847
49- constructor ( private readonly componentFactoryResolver : ComponentFactoryResolver ,
50- private route : ActivatedRoute ,
48+ constructor ( private route : ActivatedRoute ,
5149 private sanitizer : DomSanitizer ) {
5250 this . hueRotation = this . route . snapshot . data [ 'hueRotate' ] ;
5351 this . component = this . route . snapshot . data [ 'scene' ] ;
5452 this . scale = this . route . snapshot . data [ 'scale' ] ;
5553 }
5654
5755 ngOnInit ( ) {
58- const componentFactory = this . componentFactoryResolver . resolveComponentFactory ( this . component ) ;
59- this . scene ( ) . createComponent ( componentFactory ) ;
56+ this . scene ( ) . createComponent ( this . component ) ;
6057 const container = document . querySelector ( '#scene-content-container' ) as HTMLElement ;
6158 container . style . transform = `scale(${ this . scale } )` ;
6259 container . style . transformOrigin = 'center' ;
You can’t perform that action at this time.
0 commit comments