File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
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 1
1
import {
2
2
Component ,
3
- ComponentFactoryResolver ,
4
3
HostBinding ,
5
4
Input ,
6
5
OnInit ,
@@ -46,17 +45,15 @@ export class SceneViewer implements OnInit {
46
45
47
46
readonly scene = viewChild . required ( 'scene' , { read : ViewContainerRef } ) ;
48
47
49
- constructor ( private readonly componentFactoryResolver : ComponentFactoryResolver ,
50
- private route : ActivatedRoute ,
48
+ constructor ( private route : ActivatedRoute ,
51
49
private sanitizer : DomSanitizer ) {
52
50
this . hueRotation = this . route . snapshot . data [ 'hueRotate' ] ;
53
51
this . component = this . route . snapshot . data [ 'scene' ] ;
54
52
this . scale = this . route . snapshot . data [ 'scale' ] ;
55
53
}
56
54
57
55
ngOnInit ( ) {
58
- const componentFactory = this . componentFactoryResolver . resolveComponentFactory ( this . component ) ;
59
- this . scene ( ) . createComponent ( componentFactory ) ;
56
+ this . scene ( ) . createComponent ( this . component ) ;
60
57
const container = document . querySelector ( '#scene-content-container' ) as HTMLElement ;
61
58
container . style . transform = `scale(${ this . scale } )` ;
62
59
container . style . transformOrigin = 'center' ;
You can’t perform that action at this time.
0 commit comments