angular2-notifications icon indicating copy to clipboard operation
angular2-notifications copied to clipboard

position setup in app.module

Open YacineAcme opened this issue 5 years ago • 0 comments

I have this in my app.module

const options = {
  maxStack: 1
};

@NgModule({
....
imports:[
...
    SimpleNotificationsModule.forRoot(options),
]

This works, however if I want to add the position attribute as:

const options = {
  position: ['top', 'right'],
  maxStack: 1
};

A compiler error comes up saying that

Argument of type '{ position: string[]; maxStack: number; }' is not assignable to parameter of type 'Options'.
  Types of property 'position' are incompatible.
    Type 'string[]' is not assignable to type 'Position'.
      Property '0' is missing in type 'string[]'. [2345]

Is this normal behaviour? is it not possible to setup position from app.module?

YacineAcme avatar Dec 11 '18 16:12 YacineAcme