-
Notifications
You must be signed in to change notification settings - Fork 28
Description
I can run angular application on terminal. Can we run this in browser?
I have made below changes but did not get blessed component. I was not getting any error because schemas: [NO_ERRORS_SCHEMA] was added module.
Main.ts
// import { platformTerminalDynamic } from 'platform-terminal';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
// platformTerminalDynamic().bootstrapModule(AppModule)
// .catch(err => console.error(err));
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
AppModule:
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
// import { TerminalModule } from 'platform-terminal';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { TextExampleComponent } from './text/text-example.component';
import { BoxExampleComponent } from './box/box-example.component';
import { TableExampleComponent } from './table/table-example.component';
import { ProgressbarExampleComponent } from './progressbar/progressbar-example.component';
@NgModule({
declarations: [
AppComponent,
TextExampleComponent,
BoxExampleComponent,
TableExampleComponent,
ProgressbarExampleComponent,
],
imports: [
CommonModule,
BrowserModule, // added broswer module
// TerminalModule
],
bootstrap: [AppComponent],
schemas: [NO_ERRORS_SCHEMA],
})
export class AppModule {
}
Can you please guild me to render this in browser? We are trying to run our project on terminal as well as in browser.