I don't get anything in components, not rendering anything even a simple example
Versions
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 @angular-devkit/build-optimizer: 0.0.35 @angular-devkit/core: 0.0.22 @angular-devkit/schematics: 0.0.41 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.9.0 @schematics/angular: 0.1.10 @schematics/schematics: 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 <!doctype html>
After all this i don't get anything when a run "ng serve --open", not even an error
this is the link for pra project
https://github.com/afabricioa/startAngular
someone to help?
I've cloned your repo and wasn't able to reproduce your issue i.e. running ng serve --open from your repo (after running npm install) launches the web app in my browser.
And my environment is pretty much the same as yours:
~/sandbox/startAngular $ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.6.0
Node: 8.9.2
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
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.4.2
webpack: 3.10.0
Some things to consider:
- Did you run any commands before running
ng serve --open? - Do you have anything in your
.bash_profileor.bashrcfiles that might hinder the angular-cli from building and serving your web app?
Where do i find .bash_profile, i looked it in npm folder users and i don't have anything like that.
I didn't run any command before "ng serve --open" just npm install, i supposed to get the the initial file from index that come with the project, but i just get a blank page in localhost:4200
tried again just cloning my repository, then i ran "ng completion --bash", "npm install" and "ng serve --open" and the index page is still blank it appears that angular can't render nothing from components, i ran "ng completion --bash" just in case, but even without this command i still get the same thing
Check your console for errors.
This issue is a support issue and not a bug or issue with the CLI itself. I suggest submitting your question where you can can some support/assistance such as StackOverflow. Closing this issue.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.