Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMarcin Lipski
9,947 Pointsapp.component has no exported member error
Hello - my code is identical as in the course, but Im getting 2 errors: Error 1: "ERROR in [at-loader] src\app\app.component.ts:11:3 Declaration expected."
The problem is the final bracket on line 11.
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: <h2>Hello World!</h2>
,
styles: [
h2 {font-family: sans-serif;
font-size:1.2em;
}
]
})
Error 2: "ERROR in [at-loader] src\app\app.module.ts:3:10 Module '"C:/Users/marci/photo_blog/src/app/app.component"' has no exported member 'AppComponent'."
The problem is 'AppComponent' on line three:
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; @NgModule({ imports: [BrowserModule], declarations: [AppComponent], bootstrap: [AppComponent]
}) export class AppModule {
}
Please help