Skip to content

[IVY][9.0.0] Adding additional inputs in directive built by ng-packagr is not recognized by consuming app in watch mode #16921

Closed
@JonWallsten

Description

@JonWallsten

🐞 Bug report

Command (mark with an x)

  • build

Description

We are building a library with ng-packagr and then consuming it in our Angular 9 application.
When I added a new input in my directive it wasn't recognized until after I stopped my build completely and started from scratch.

After the first initial build, when in watch mode, I added the input resizeElement

@Directive({
    selector: '[resizable]'
})
export class ResizableDirective implements OnInit, OnDestroy {
    @Input('resizable') containerSelector: string;
    @Input('resizeElement') resizeElementSelector: string;
    ...
}

After the library was rebuilt by the watcher, and then the app was rebuilt, also by a watcher, the input was not recognized by the Angular compiler.

🔬 Minimal Reproduction

As usual I can provide an example but it takes time. Let me know if it's needed.

🔥 Exception or Error


 | ERROR in packages\web-app-edit\src\app\components\common\condition-editor\condition-editor.component.html:1:33 - error NG8002: Can't bind to 'resizeElement' since it isn't a known property of 'div'. |
 | 1 
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | packages\web-app-edit\src\app\components\common\condition-editor\condition-editor.component.ts:6:18 | 6 templateUrl: 'condition-editor.component.html', | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Error occurs in the template of component ConditionEditorComponent. |

🌍 Your Environment


Angular CLI: 9.0.1
Node: 12.14.0
OS: win32 x64

Angular: 9.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cli                      9.0.1
@angular/http                     8.0.0-beta.10
@ngtools/webpack                  9.0.1
@schematics/angular               9.0.1
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.5

Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions