1

I’m using .forRoot() while importing some of the modules in my app, for instance tooltip from ngx-bootstrap. After the last upgrade to Angular 6 an interesting warning appeared: Error during template compile of ‘moduleName’. Function calls are not supported in decorators but ‘moduleName’ was called.

For sure it has something to do with this: Error: The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead.

Angular 5 works fine with TS 2.8.3 and has no described issues what so ever.

Can please someone explain how to fix this and why on Earth would you release new version of Angular not compatible with the latest TS?

Jota.Toledo
  • 27,293
  • 11
  • 59
  • 73
Alex Cross
  • 71
  • 4

2 Answers2

0

Typescript doesnt follow semantic versioning. So "minor releases" can include mayor/breaking changes in the package. For this reason, angular has a strict dependency range for typescript, as those are the versions that are battle-tested.

You should downgrade typescript and see if the issue still exists.

Jota.Toledo
  • 27,293
  • 11
  • 59
  • 73
  • Jota.Toledo, thankx for your answer. A downgrate of the typescript to the version "2.7.2 <= x < 2.8.3" is the only way to make Angular 6 work. I fixed the issue with "forRoot()" by implementing a wrapper for 'ngx-bootstrap' modules. – Alex Cross May 08 '18 at 08:38
0

There are many breaking changes in the RxJS library from Angular 5 to Angular 6.

I don't think ngx-bootstrap has been updated yet:

https://github.com/valor-software/ngx-bootstrap/issues/4299

Michael Kang
  • 52,003
  • 16
  • 103
  • 135
  • Pixelbits, if you use RxJS of the 6th version you need to install "rxjs-compat" of the same version to make it work. – Alex Cross May 08 '18 at 08:42