Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(doc-gen): render @example tag for ngdoc @method #15448

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Nov 29, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feat / fix to the docs app

What is the current behavior? (You can also link to an open issue here)
@example in @method is not rendered

Does this PR introduce a breaking change?
No

Please check if the PR fulfills these requirements

Currently, ngdoc `@method` ignores `@example` tags and does not output them.
This is usually not a problem, as examples are mostly defined directly
in the `@description` via code blocks or `<example>`
elements. However, some methods still have `@example` tags (possibly
from a previous docs version).

While not absolutely necessary, having special markup for Examples
makes them a) easier to find visually in the docs, and b) easier
to link to as they will have a unique id.

Closes angular#14722
@Narretz Narretz force-pushed the docs-method-examples branch from 93ad990 to a0a71ab Compare November 29, 2016 22:50
@@ -51,7 +51,7 @@ <h2 id="dependencies">Dependencies</h2>

{% block examples %}
{%- if doc.examples %}
<h2 id="example">Example</h2>
<h2 id="example">Examples</h2>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changes this because all of our headlines are plural, even if there's only one member (Parameters, Methods). I didn't change the id to not break any links.

@Narretz Narretz merged commit f5d2bf3 into angular:master Dec 1, 2016
Narretz added a commit that referenced this pull request Dec 2, 2016
Currently, ngdoc `@method` ignores `@example` tags and does not output them.
This is usually not a problem, as examples are mostly defined directly
in the `@description` via code blocks or `<example>`
elements. However, some methods still have `@example` tags (possibly
from a previous docs version).

While not absolutely necessary, having special markup for Examples
makes them a) easier to find visually in the docs, and b) easier
to link to as they will have a unique id.

Closes #14722
Closes #15448
ellimist pushed a commit to ellimist/angular.js that referenced this pull request Mar 15, 2017
Currently, ngdoc `@method` ignores `@example` tags and does not output them.
This is usually not a problem, as examples are mostly defined directly
in the `@description` via code blocks or `<example>`
elements. However, some methods still have `@example` tags (possibly
from a previous docs version).

While not absolutely necessary, having special markup for Examples
makes them a) easier to find visually in the docs, and b) easier
to link to as they will have a unique id.

Closes angular#14722
Closes angular#15448
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants