angular-cesium build problems with Angular 5

1. A concise explanation of the problem you’re experiencing.

I trying to get a angular-cesium demo app working with Angular 5. Seems angular-cesium npm lib (v0.0.36) uses ‘ngOutletContext’ which as been depreciated in Angular 5 and replaced with ‘ngTemplateOutletContext’.

Here is the error I receive when attempting to build the app…

  1. If ‘ngOutletContext’ is an Angular directive, then add ‘CommonModule’ to the ‘@NgModule.imports’ of this component.

  2. To allow any property add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component. (“ntityId”>

           <ng-template [ngTemplateOutlet]="acHtmlTemplate"
    
                        [ERROR ->][ngOutletContext]="acHtmlContext"></ng-template>
    
       </div>
    
    ")

Error at /Users/billsimac/tpdev/talon-point/tp2-app/node_modules/angular-cesium/src/angular-cesium/components/ac-html-desc/ac-html-desc.component.d.ts.AcHtmlDescComponent.html(4,15): Property binding ngOutletContext not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the “@NgModule.declarations”. (" id; let acHtmlContext = context">

      <div [acHtmlContainer]="acHtmlEntityId">

          [ERROR ->]<ng-template [ngTemplateOutlet]="acHtmlTemplate"

                       [ngOutletContext]="acHtml")

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

part of my ‘app.module.ts’.

import { AngularCesiumModule } from ‘angular-cesium’;

.

.

.

@NgModule({

declarations: [

AppComponent,

],

imports: [

BrowserModule,

HttpClientModule,

SharedModule,

.

.

.

CoreModule,

AngularCesiumModule.forRoot(),

.

.

.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I’m not sure if this is the only issue angular-cesium has with Angular 5 but if so, it appears it should be a quick fix. I’ve had to make the change in my own code base (ngOutletContext -> ngTemplateOutletContext) and it worked well.

Hoping to see an update to the angular-cesium lib very soon!!!

4. The Cesium version you’re using, your operating system and browser.

“angular-cesium”: “0.0.36”

Hi Bill,

angular-cesium is not an official part of Cesium and is therefore not supported by the team. Try contacting the creators of that library.

Thanks!

Gabby