-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
BREAKING CHANGEIndicates a breaking changeIndicates a breaking changetype: compatibilityIndicates an issue that only occurs on specific browsers / operating systems / devicesIndicates an issue that only occurs on specific browsers / operating systems / devices
Description
With new Angular 15 tandalone components became stable, however there is a little problem with this library when using them.
We have to importmodule when app is bootstrapping:
const providers = importProvidersFrom(
...
NotifierModule.withConfig({
position: {
horizontal: { position: 'right' },
vertical: { position: 'top' },
},
behaviour: {
autoHide: 3000,
},
}),
);
bootstrapApplication(AppComponent, {
providers: [
providers,
...
],
}).catch((err) => console.error(err));
and we cannot import Notifier component it self to app.component.ts like this:
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterModule, NotifierNotificationComponent], <--------------- not stand alone
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements OnInit, OnDestroy {
instead we have to import module which resets config.
There is a little fix for that - we need to declare notifier as standalone.
sam-eah and Packers64
Metadata
Metadata
Assignees
Labels
BREAKING CHANGEIndicates a breaking changeIndicates a breaking changetype: compatibilityIndicates an issue that only occurs on specific browsers / operating systems / devicesIndicates an issue that only occurs on specific browsers / operating systems / devices