Using a standalone custom directive in a NOT standalone component
I created a custom structural directive and I want to be able to reuse it in different componentsa.
Everything works fine when it's not standalone, but when I add standalone: true it's giving me an error: 'imports' is only valid on a component that is standalone.
I don't want to make my component standalone as well, only the directive.
Is there a way to achieve that?
You can import standalone directives into your modules in the same way you would import a module: https://angular.io/guide/standalone-components#using-standalone-components-in-ngmodule-based-applications