I want to insert a button between "previous page" and "next page" in a mat-paginator component, and for that I wrote a directive that does the job of injecting the paginator and its DOM reference, and doing the proper insertions using Angular's Renderer2
. It works, with exception of these two fails:
SVG icon is not rendered (button works but appears blank)(solved, see edit);- ToolTip is not shown.
Could someone take a look and tell what I'm missing? Thanks in advance.
EDIT
The problem with icon not rendering was solved by adding the 'svg' namespace to elements <svg> and <path> (thanks, reddit).
I managed to solve by creating a new
MatToolTip
on the fly.Check solution on StackBlitz, please look at the constructor's parameters and the
attachMatToolTip()
method.Any improvement suggestions are more than welcome!