Skip to content

Commit 80c9c76

Browse files
fix: make example standalone
1 parent 9a5bea2 commit 80c9c76

File tree

3 files changed

+11
-22
lines changed

3 files changed

+11
-22
lines changed

projects/examples/src/app/app.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { Component } from '@angular/core'
22
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
33

4+
import { BrowserModule } from '@angular/platform-browser'
5+
import { StlModelViewerModule } from 'angular-stl-model-viewer'
46
import * as THREE from 'three'
57

68
@Component({
79
selector: 'app-root',
10+
imports: [
11+
BrowserModule,
12+
StlModelViewerModule
13+
],
814
styleUrls: ['./app.component.css'],
915
templateUrl: './app.component.html'
1016
})

projects/examples/src/app/app.module.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

projects/examples/src/main.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { enableProdMode } from '@angular/core'
2-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
32

4-
import { AppModule } from './app/app.module'
3+
import { bootstrapApplication } from '@angular/platform-browser'
4+
import { AppComponent } from './app/app.component'
55
import { environment } from './environments/environment'
66

77
if (environment.production) {
88
enableProdMode()
99
}
1010

11-
platformBrowserDynamic().bootstrapModule(AppModule)
11+
bootstrapApplication(AppComponent, {
12+
providers: []
13+
})
1214
.catch(err => console.error(err))

0 commit comments

Comments
 (0)