0
공통 라이브러리에 구성 요소 LandingComponent
이 있습니다. 이 구성 요소는 응용 프로그램의 다른 모든 모듈에서 사용해야합니다. (폴더 내의 /app
)각도 2 RC5 - 다른 모듈에서 사용하는 공통 구성 요소
파일 구조 :
/library
landing.component.ts
/module1
mod1.module.ts
mod11.component.ts
/module2
mod2.module.ts
mod21.component.ts
app.module.ts
mod11.component.ts 발췌
@Component({
template: '<landing title="M1C1 title" desc="M1C1 description"></landing>';
})
export class Mod11Component {}
mod21.component.ts 발췌
@Component({
template: '<landing title="M2C1 title" desc="M2C1 description"></landing>';
})
export class Mod11Component {}
가져 오기 및 선언/지시문을 어떻게 구성하여 작동시켜야합니까? 라이브러리 구성 요소 용 모듈을 만들어 다른 모듈에서 사용해야합니까?