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
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 ?
Most helpful comment
I'm using version 2.0.0-beta.6
It's been moved to
bs-modal-ref.service.tshereSo
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';would work