Angular Custom Configuration

start.ts

import './polyfills';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { environment } from './environments/environment';
import { StartModule } from './app/start.module';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic()
.bootstrapModule(StartModule)
.then((ref) => {
// Ensure Angular destroys itself on hot reloads.
if (window['ngRef']) {
window['ngRef'].destroy();
}
window['ngRef'] = ref;

// Otherwise, log the boot error
})
.catch((err) => console.error(err));

start.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { HomeComponent } from './home.component';

@NgModule({
imports: [BrowserModule, FormsModule],
declarations: [AppComponent, HomeComponent],
bootstrap: [HomeComponent],
})
export class StartModule {}
<home>loading</home>
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/start.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css", "src/custom.css"],
"scripts": []
},

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Piyali Das

Piyali Das

72 Followers

Angular | Angular Material | Typescript | JavaScript | HTML5 | CSS3 | SASS | RWD