-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support passing template in factory #299
Comments
It's legacy code, and I'll remove it. Thanks. You can do: beforeEach(() => (spectator = createPipe(`{{ [1, 2, 3] | sum }}`))); |
Hey @NetanelBasal thanks for the response. Oh, so it should be removed from the 3 interfaces? Btw, your suggestion is a little bit different to what I was trying to accomplish. I was trying to have a fixed template and manipulate the PS: Shouldn't this issue remain open to track this for future removal? |
After re-examining the code, I think we can add this as a feature. Currently, we ignore the template passed in the factory. Do you want to create a PR? |
I'm submitting a...
Current behavior
I noticed that
SpectatorDirectiveOptions
supports (or at least is what the interface tell us) a "fixed" template, so I tried to use it:... however it gives the error I have commented out. Since it isn't allowed to have a "fixed" template as
createDirective
always expect a template, I wonder why exists this option.Note that the same happens with
SpectatorHostOptions
and withSpectatorPipeOptions
:... the test fails because it doesn't recognizes the template (the
input
is always empty. No matter theinput
I pass).It's not clear in docs how to use, or even if it's possible to use this feature.
Expected behavior
I'd expect to know if it's possible to use it.
Environment
The text was updated successfully, but these errors were encountered: