I'm a bit confused with pipes,I know there are some few question similar to this but I haven't seen a problem with nested components I'm using Angular ^4.1.3 with the angular-seed 2 repo it works when I used the root component but I need it in the student component which is nested in the home component
├── src
│ └── client
│ ├── app
│ │ ├── app.component.e2e-spec.ts
│ │ ├── app.component.html
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ ├── app.routes.ts
│ │ ├── home <---- it works here
| | | ├── student <---but not here
│ │ │ | ├── student.component.scss
| | │ │ ├── student.component.html
| | │ | ├── student.component.ts
| | │ | |── student.module.ts
| | | ├── class
│ │ │ | ├── class.component.scss
| | │ │ ├── class.component.html
| | │ | ├── class.component.ts
│ │ │ ├── home.component.css
│ │ │ ├── home.component.html
│ │ │ ├── home.component.ts
│ │ │ ├── home.module.ts
│ │ │ ├── home.routes.ts
I don't know what I'm missing but I still getting the message The pipe 'truncate' could not be found
src/client/app/home/student/student.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { StudentComponent } from './student.component';
import { TruncatePipe } from '../../truncate.pipe';
@NgModule({
imports: [BrowserModule],
declarations: [StudentComponent , TruncatePipe],
exports: [StudentComponent ],
providers: []
})
export class StudentModule { }
/src/client/app/app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { APP_BASE_HREF } from '@angular/common';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { AboutModule } from './about/about.module';
import { HomeModule } from './home/home.module';
import { SharedModule } from './shared/shared.module';
import { PipeModule } from './shared/pipes.module';
@NgModule({
imports: [BrowserModule,
BrowserAnimationsModule,
HttpModule,
AppRoutingModule,
AboutModule,
HomeModule,
SharedModule.forRoot(),
PipeModule.forRoot() ],
declarations: [AppComponent],
providers: [{
provide: APP_BASE_HREF,
useValue: '<%= APP_BASE %>'
}],
bootstrap: [AppComponent]
})
export class AppModule { }