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
aio + docs/api: pipe API pages #22702
Conversation
You can preview 64276a2 at https://pr22702-64276a2.ngbuilds.io/. |
64276a2
to
4982294
Compare
You can preview 4982294 at https://pr22702-4982294.ngbuilds.io/. |
Here is how the |
Here is how the |
|
||
<section class="{$ doc.docType $}-overview"> | ||
<code-example hideCopy="true" class="no-box api-heading">{{ {$ doc.valueParam.name $}_expression | <span class="kwd nocode">{$ doc.pipeName $}</span> | ||
{%- for param in doc.pipeParams %} : {% if param.isOptional or param.defaultValue !== undefined %}[ {% endif -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the [
be placed before the :
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess so.
{ name: 'transform', parameterDocs: [valueParam, pipeParam1, pipeParam2] } | ||
] } ]; | ||
processor.$process(docs); | ||
expect(docs[0].valueParam).toEqual(valueParam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With toEqual
you aren't really testing that it extracted the first element as valueParam
.
You should either use toBe()
or make the three objects different.
{ name: 'transform', parameterDocs: [valueParam, pipeParam1, pipeParam2] } | ||
] } ]; | ||
processor.$process(docs); | ||
expect(docs[0].pipeParams).toEqual([pipeParam1, pipeParam2]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again toEqual()
doesn't guarantee that the correct objects have been extracted (since all objects are identical).
9238378
to
12f1c6c
Compare
You can preview 9238378 at https://pr22702-9238378.ngbuilds.io/. |
You can preview 12f1c6c at https://pr22702-12f1c6c.ngbuilds.io/. |
@petebacondarwin Looks like this has a lint error? |
Doh! |
This change adds: * an impure badge for Pipes that are marked as `pure: false` * a pipe specific overview that shows the syntax for using a pipe in a template. * an "input value" section describing the type of the value that the pipe expects. * a "pipe params" section describing any additional params that a pipe expects.
12f1c6c
to
f5448bf
Compare
You can preview f5448bf at https://pr22702-f5448bf.ngbuilds.io/. |
Oh wow! Thanks @kara - you spotted I fixed it. That is super efficient. |
This change adds: * an impure badge for Pipes that are marked as `pure: false` * a pipe specific overview that shows the syntax for using a pipe in a template. * an "input value" section describing the type of the value that the pipe expects. * a "pipe params" section describing any additional params that a pipe expects. PR Close angular#22702
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This change adds:
pure: false