Reputation: 447
hy guys i have problem like this,
i have a app.typescript and inside it i import
import { Component } from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import { MODAL_DIRECTVES } from 'ng2-bootstrap';
@Component({
moduleId: module.id,
selector: 'my-app',
templateUrl: 'my-app.component.html',
styleUrls: ['my-app.component.css'],
directives: [MODAL_DIRECTVES]
})
export class my-appComponent {
title = 'Mp App';
}
but when i run it i got an error that say cant find module ng2-bootstrap
Upvotes: 0
Views: 968
Reputation: 1044
As per the documentation here. It appears you must import from a nested path:
import { MODAL_DIRECTIVES } from 'ng2-bootstrap/ng2-bootstrap';
or
import { MODAL_DIRECTIVES } from 'ng2-bootstrap/components/modal';
Upvotes: 1