복붙노트

[ANGULAR] 주요 앱 외부의 각형 구성 요소 렌더링

ANGULAR

주요 앱 외부의 각형 구성 요소 렌더링

해결법


  1. 1.NGModule에 전달 된 부트 스트랩 배열에 필요한 구성 요소를 추가하십시오.

    NGModule에 전달 된 부트 스트랩 배열에 필요한 구성 요소를 추가하십시오.

    @NgModule({
      declarations: [AppComponent, ContactFormComponent],
      imports: [...],
      providers: [SharedService],
      bootstrap: [AppComponent, ContactFormComponent]
    })
    export class AppModule {}
    

    그리고 지금이 작품은 다음과 같습니다.

    <html><body>
      <app-contact-form></app-contact-form>
      ============================================
      <app-root></app-root>
    </body></html>
    

    위의 답변 Günter의 답변에서 플러스에서 이것을 배웠습니다. 매우 멋지다. Angular 6으로 테스트 됨


  2. 2.여러 요소를 부트 스트랩 할 수 있습니다. 다른 Angular2 응용 프로그램의 구성 요소간에 통신 할 수 있도록 공유 서비스를 주입 할 수 있습니다 (동일한 페이지에서).

    여러 요소를 부트 스트랩 할 수 있습니다. 다른 Angular2 응용 프로그램의 구성 요소간에 통신 할 수 있도록 공유 서비스를 주입 할 수 있습니다 (동일한 페이지에서).

    Angular2 구성 요소로 부트 스트랩 모달을 동적으로 생성하는 방법은 무엇입니까?

  3. from https://stackoverflow.com/questions/38526221/render-angular-component-outside-the-main-app by cc-by-sa and MIT license