ng --version
Angular CLI: 1.6.0 Node: 8.9.1 OS: darwin x64 Angular: 5.1.0 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router
@angular/cli: 1.6.0 : 0.0.35 : 0.0.22 : 0.0.41 : 1.1.0 : 1.9.0 : 0.1.10 : 0.0.10 typescript: 2.4.2 webpack: 3.10.0
Mac OS Sierra
Repro steps
app-routing-module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
const routes: Routes = [
{path:'home', component: HomeComponent},
{path:'about', component: AboutComponent},
{path:'', redirectTo: '/home', pathMatch: 'full'}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
app.component.html
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
@NgModule({
declarations: [
AppComponent,
HomeComponent,
AboutComponent
],
imports: [
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
index.html
Angular Project After following all these steps, the "ng serve --open" command does not display anything on the index page.
This is the link to the project:
https://github.com/afabricioa/startAngular
Is there anyone who can help?
Tried cloning the repository again and running "ng completion --bash", "npm install" and "ng serve --open", but still getting a blank index page. It seems like Angular is unable to render components properly. Even after running "ng completion --bash", the issue remains unresolved.