Javascript 管道';安全资源URL';找不到

Javascript 管道';安全资源URL';找不到,javascript,angular,typescript,Javascript,Angular,Typescript,正在解决一些安全错误,因为我正在尝试将youtube视频动态嵌入Angular 2应用程序。在这里找到关于使用管道清理url的答案 但是,它遇到了当前的错误 找不到管道“SafeSourceUrl” SafeResourceUrl.pipe.ts 我已将其导入我的应用程序模块 并在我的家中导入。component.ts 从“../shared/pipes/SafeResourceUrl.pipe”导入{SafeResourceUrl} home.component.html的标记 无法在全球范

正在解决一些安全错误,因为我正在尝试将youtube视频动态嵌入Angular 2应用程序。在这里找到关于使用管道清理url的答案

但是,它遇到了当前的错误

找不到管道“SafeSourceUrl”

SafeResourceUrl.pipe.ts 我已将其导入我的应用程序模块 并在我的家中导入。component.ts
从“../shared/pipes/SafeResourceUrl.pipe”导入{SafeResourceUrl}

home.component.html的标记
无法在全球范围内提供管道。无论在何处使用,它们都需要导入,就像组件或指令一样

@NgModule({
    declarations: [
        SafeResourceUrl
    ],
    imports: [
      CommonModule
    ]
})
class SharedModule {

啊,明白了,在我将它导入我的
共享模块后,也没有任何错误了,是的,从
应用程序模块中删除了它。谢谢!!!
import { NgModule } from '@angular/core';
import { HomeModule } from './home/home.module';
import { SharedModule } from './shared/shared.module';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SafeResourceUrl } from './shared/pipes/saferesourceurl.pipe';

@NgModule({
    declarations: [
        AppComponent,
        SafeResourceUrl
    ],
    imports: [
        SharedModule,
        HomeModule,
        AppRoutingModule
    ]
})
<div class="container col-lg-3 col-md-6 col-sm-12" *ngFor="let card of category.categorycards">
<div class="thumbnail">
    <a href="/wiki/entity" *ngIf="card.type == 'image'">
        <div class="image-wrap">
            <img [src]="card.graphic" class="img-responsive" alt="[card.title]" title="[card.title]">
        </div>
    </a>

    <a href="/wiki/category" *ngIf="card.type == 'video'">
        <div class="image-wrap">
            <iframe title="YouTube video player"
                    class="youtube-player" type="text/html" 

                    [src]="card.url | safeResourceUrl"

                    height="100%" width="100%" frameborder="0"></iframe>
        </div>
    </a>
@NgModule({
    declarations: [
        SafeResourceUrl
    ],
    imports: [
      CommonModule
    ]
})
class SharedModule {
@NgModule({
    declarations: [
      CommonModule,
      HomeComponent,
    ],
    imports: [
        SharedModule,
    ]
})
class HomeModule