Ngx-bootstrap: Modal BsModalRef export issue

Created on 24 Aug 2017  路  9Comments  路  Source: valor-software/ngx-bootstrap

Hi,

I am trying to use BsModalRef as per the examples provided. However I get the following error while compiling. What could be missing, please let me know.

ERROR in C:../confirm-modal/confirm-modal.component.ts (2,10): Module '"C:../node_modules/ngx-bootstrap/modal/modal-options.class"' has no exported member 'BsModalRef'.

Thanks
Giridhar

Most helpful comment

I'm using version 2.0.0-beta.6

It's been moved to bs-modal-ref.service.ts here

So import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; would work

All 9 comments

that's strange...
@Injectable() class BsModalRef {
hopefully you are importing it from ngx-bootstrap/modal
and using angular-cli

please provide more details about your configuration,
drop a note to slack when it will be

Upgraded ngx-bootstrap to 1.9, it works now thank you :)

I am having the same issue, but I am using the beta version: 2.0.0-beta.2, It looks like their have been some major changes to the modal module. Are there some examples or documentation for this version.

I upgraded to version 2.0.0-beta.4 and that fixed me problem.

I'm using version 2.0.0-beta.6

It's been moved to bs-modal-ref.service.ts here

So import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; would work

Don't use deep imports, if we forgot to export something from index files, it's an issue
But internal could change anytime

for "ngx-bootstrap": "^1.9.3":
import { BsModalRef } from 'ngx-bootstrap/modal/modal-options.class';

i have the same issue .for "ngx-bootstrap": "^5.3.2",
how can i resolve this?

what version of Angular do you use, @neethu-george ?

Was this page helpful?
0 / 5 - 0 ratings