Giter Club home page Giter Club logo

Comments (4)

safraja avatar safraja commented on June 20, 2024 1

Thanks very much for such a quick fix! You're right, everything seems to be working now, even the controls (in case I need to use it somewhere).

I have to say that so far I really like ngdoc and it's fantastic how quickly you're responding. Thanks again, if I run into any more problems I'll create another ticket. 🙂

from ng-doc.

safraja avatar safraja commented on June 20, 2024

In connection to this, I'd like some advice. Since the input signals weren't automatically recognized, I defined the controls manually in NgDocPlaygroundControlConfig.controls, but I failed to create a select control. Even though I used

'size': { type: 'string', options: ['s', 'm', 'l', 'xl'] }

it generated normal text input, not select. I tried several different definitions I could think of, but none succeeded.
Could you please advise me how to write it correctly so that I get a select control with options 's', 'm', 'l' and 'xl'?

from ng-doc.

skoropadas avatar skoropadas commented on June 20, 2024

Amazing research, thank you! I've fixed all the bugs you found, and I've also fixed the issue with the controls field. Now everything should work fine.

About your question:
You should use the name of your type alias as the type if you have it, because specifying the type as string makes NgDoc create a control for managing string type:

'size': { type: 'Size', options: ['s', 'm', 'l', 'xl'] }

Or if for any reason you don't have a separate type, you can also specify the type as NgDocTypeAlias, which is a general type used internally to manage all recognized type alias types that NgDoc can understand (this is not mentioned in the documentation, but I'll add an explanation later):

'size': { type: 'NgDocTypeAlias', options: ['s', 'm', 'l', 'xl'] }

from ng-doc.

skoropadas avatar skoropadas commented on June 20, 2024

🎉 This issue has been resolved in version 17.5.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

from ng-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.