Skip to content

Can we run our code on terminal as well as on browser? #16

@HemTech

Description

@HemTech

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions