Ngx-bootstrap: How do I pass a string value to popover template, via popoverContext?

Created on 23 Mar 2018  路  4Comments  路  Source: valor-software/ngx-bootstrap

{{ message }}

The above example from the official website of ngx-bootstrap enforces the value to be passed to be an object. i.e. context here in the example is an object. What if my context is just a string or number?

Most helpful comment

In template:
[popoverContext]="getPopoverContent( 'foo' )

In component:
public function getPopoverContent( bar ) { return { messsage: bar }; }

All 4 comments

is anybody knows?

In template:
[popoverContext]="getPopoverContent( 'foo' )

In component:
public function getPopoverContent( bar ) { return { messsage: bar }; }

Yes, context is an object. So just pass it as an object

What if I want access to the context object itself?

Was this page helpful?
0 / 5 - 0 ratings