0đź‘Ť
Unfortunately, I can’t see the CustomComponent code, which is required to be created following an interface, which is described in this docpage under the warning. Make sure that CustomComponent is valid.
P.S. – Both of those ways do the same thing but in different ways. With the first one, you’ll import that component to another and set him in the template, but with the second one, you’ll call a tool, that creates a new modal with passed parameters. But the second one doesn’t have all functionality compared to the first one.
Source:stackexchange.com