Ngx-bootstrap: Using deprecated ngOutletContext, Angular 5.x will fail to build

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

The ngOutletContext is deprecated in Angular 4 and will be removed in Angular 5. Please use
ngTemplateOutletContext

https://github.com/angular/angular/blob/master/CHANGELOG.md#deprecated-code

It is used here for example: https://github.com/valor-software/ngx-bootstrap/blob/31c5f62a48560d4372f0043241829a27e5f3deb6/src/sortable/sortable.component.ts (line 42)

Other files I found with ngOutletContext:

  • src/typeahead/typeahead-container.component.html
  • src/rating/rating.component.html
  • src/sortable/sortable.component.ts
comp(sortable)

Most helpful comment

Created a PR: #2659

All 6 comments

Created a PR: #2659

Thanks for, at the moment we are working on dropping support of ng 2, and moving to support ng v4 and v5
So PR is just in time :)

By replacing ngOutletContext to ngTemplateOutletContext in all files, it worked for me.

@Anoop-Goudar That is exactly what this PR did, and it is already merged, so use the latest beta version.

@MrBlaise Thanks, I updated the package ngx-bootstrap to 2.0.0-beta.8

I was using ion2-calendar. It was using ngOutletContext. Replacing it with ngTemplateOutletContext worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RolfVeinoeSorensen picture RolfVeinoeSorensen  路  3Comments

pgeyman picture pgeyman  路  3Comments

haisaco picture haisaco  路  3Comments

hugonne picture hugonne  路  3Comments

juanitavollmering picture juanitavollmering  路  3Comments