Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NgModule decorator outside module function #484

Open
bertdewolf opened this issue Jan 5, 2023 · 0 comments
Open

NgModule decorator outside module function #484

bertdewolf opened this issue Jan 5, 2023 · 0 comments

Comments

@bertdewolf
Copy link

bertdewolf commented Jan 5, 2023

In for example ngx-bootstrap-multiselect.umd.js I see:

var NgxBootstrapMultiselectModule = /** @class */ (function () {
    function NgxBootstrapMultiselectModule() {
    }
    return NgxBootstrapMultiselectModule;
}());

NgxBootstrapMultiselectModule.decorators = [
    { type: core.NgModule, args: [{
                declarations: [
                    NgxDropdownMultiselectComponent,
                    MultiSelectSearchFilter,
                    AutofocusDirective,
                    OffClickDirective
                ],
                imports: [
                    common.CommonModule,
                    forms.ReactiveFormsModule
                ],
                exports: [
                    NgxDropdownMultiselectComponent,
                    MultiSelectSearchFilter,
                ],
            },] }
];

For angular 14 ngcc to work correctly, the NgModule decorators should be within the NgxBootstrapMultiselectModule function.
This in turn causes for errors like 'NgxBootstrapMultiselectModule does not have a module def (ɵmod property)'

With which typescript version was this bundle packaged?

I cannot play with it myself since not everything for angular cli is in this repo.

@bertdewolf bertdewolf changed the title NgModule decorator outside module class NgModule decorator outside module function Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant