Ngx-bootstrap: Can't resolve all parameters for TooltipOptions

Created on 6 Feb 2017  路  15Comments  路  Source: valor-software/ngx-bootstrap

Just updated to version 1.3.3, but having this error while doing AoT compilation:
Can't resolve all parameters for TooltipOptions in path/node_modules/ng2-bootstrap/tooltip/tooltip-options.class.d.ts
I'm not using TooltipOptions anywhere. Using webpack 2.2.1, TS 2.1.5, Angular 4.0.beta6.
On JiT works fine.

comp(tooltip)

Most helpful comment

All 15 comments

Same issue

I will need to replace it with interface or something... strange it was working fine before

The same error with default JIT compilation

Confirm the error for AoT, JiT is fine.
ng2-bootstrap 1.3.3, Angular 4.0.0 RC1, angular-cli 1.0.0 RC0

@valorkin This needs a fix because Angular 4 is nearly here.

Works in Angular 2 but not in Angular 4

I took a look, there are not so many breaking changes for devs, but a lot for lib devs :(

I found workaround:

import { TooltipModule } from 'ng2-bootstrap/tooltip/tooltip.module'

instead of

import { TooltipModule } from 'ng2-bootstrap/tooltip'

just don't import deprecated ng2-bootstrap/tooltip/tooltip-options.class.js which exported automatically from ng2-bootstrap/tooltip/index.js

@Iverson I don't import this module anywhere and still get the error.

@valorkin :+1: When will be new NPM version released?

Updated cli to rc.0
tomorrow I want to release 2 versions
With ng v2 and 4

@valorkin Please note an interesting side effect.
In my code I use lazy load, AOT compilation and shared factory where init and expose all ng2-bootstrap modules across the app.

When I import all modules directly as @Iverson suggested
import { TooltipModule } from 'ng2-bootstrap/tooltip/tooltip.module'
the size of vendor.bundle.js becomes slightly bigger, but lazy loaded chunks which use shared ng2-bootstrap modules become much smaller.

In result my total AoT tree-shaked, minified and compressed production build is 200kb lighter.

I use Angular 2.4.8, CLI RC0

I'm dying here waiting for the fix :(

Also waiting for the fix. @valorkin can you tell when the new release will be ready?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpiros picture tpiros  路  3Comments

RolfVeinoeSorensen picture RolfVeinoeSorensen  路  3Comments

MihaiHoriaPopescu picture MihaiHoriaPopescu  路  3Comments

phmello picture phmello  路  3Comments

ctrl-brk picture ctrl-brk  路  3Comments