2016-06-20 3 views
0

나는 NG2 - 부트 스트랩 툴팁 구성 요소를 사용하려고 노력하지만, 때마다 내가 얻을가져 오기 NG2 - 부트 스트랩 (NG2 RC2 - bootstrap3)

GET HTTP : /example.com/node_modules/ng2-bootstrap/ng2 (찾을 수 없음) -bootstrap (404)는

나는 시도 :

import {TOOLTIP_DIRECTIVES} from '../../../ng2-bootstrap'; 
import {TOOLTIP_DIRECTIVES} from 'node_modules/ng2-bootstrap/ng2-bootstrap'; 
import {TOOLTIP_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap'; 

this post

에서 SystemJS의 설정과 마지막 하나 내가 1.0.17 NG2 - 부트 스트랩 Angular2 RC2를 사용하고 3.3.6 부트 스트랩

import {Component, Input} from '@angular/core'; 
import {CORE_DIRECTIVES, FORM_DIRECTIVES} from '@angular/common'; 
import {TOOLTIP_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap'; 

@Component({ 
    selector: 'check-type', 
    templateUrl: 'app/task/overview/check-type/check-type.html', 
    directives: [TOOLTIP_DIRECTIVES, CORE_DIRECTIVES, FORM_DIRECTIVES], 
    changeDetection: ChangeDetectionStrategy.OnPush 
}) 

export class CheckType { 
    public mytooltip:string = "My Tooltip"; 
} 

: 같은

map { 
    ... 
    'ng2-bootstrap/ng2-bootstrap': 'node_modules/ng2-bootstrap/ng2-bootstrap', 
    ... 
} 

내 구성 요소가 보인다. 체크 - 인덱스 HTML 검사에서 NG2 - bootstrap.min.js -

+0

ng2-bootstrap이 ngx-bootstrap으로 이름이 변경되었습니다. – valorkin

답변

0

moment.js이 SystemJS의 설정에 체크 - 삽입 매핑을 포함하는 단서가있는 항목없이

import {TOOLTIP_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap'; 

를 사용하는 것이 었습니다 SystemJS 설정의지도 객체는 또한

format: 'register'

항목을 제거 (나는 N2 - 부트 스트랩의 GIT 페이지에 설명 된대로 배치)하거나 교체하기 가져 오기가 이런 식으로 작업하는 이유 누군가가 설명 할 수 있다면

format: 'cjs'

와 (나는 행복 할 것입니다. 지금은 작동하지만, 나에게 의미가 없습니다. SystemJS가 ng2-bootstrap 폴더 만 검색하는 대신 노드 폴더에서 ng2-bootstrap을 검색하라는 내용을 이해하지 못합니다.