dgeni icon indicating copy to clipboard operation
dgeni copied to clipboard

(feat) Support for importing example partials

Open btesser opened this issue 10 years ago • 4 comments

The ngdocs syntax is excellent, but I have a strong aversion to putting html and javascript examples directly in the code. Is it possible with dgeni to maybe write an adapter that would allow importing external html partials and js files for examples? Possible syntax would be:

/**
 * @example.html url('../examples/feature/dosomething.html')
 * @example.js url('../examples/feature/dosomething.js')
 */

btesser avatar Mar 23 '14 23:03 btesser

Great idea. I think it would work better with an inline tag, perhaps...

{@example srcs="['examples/feature/dosomething.html', ...]"}

... then you can place examples at any point in your documentation.

petebacondarwin avatar Mar 24 '14 06:03 petebacondarwin

No arguments. Feature is the main thing!

btesser avatar Mar 24 '14 14:03 btesser

I love the idea :+1:

boennemann avatar Mar 24 '14 15:03 boennemann

Anyone fancy writing a pull request to dgeni-packages for this?

petebacondarwin avatar Apr 13 '14 20:04 petebacondarwin