Giter Club home page Giter Club logo

Comments (11)

skoropadas avatar skoropadas commented on June 16, 2024 1

@rubenprins good catch, it was an old bug in my parser, it's gonna be fixed in the new version, I'll also add some tests for it later because it's quite an important part of the library.

from ng-doc.

rubenprins avatar rubenprins commented on June 16, 2024 1

@skoropadas Looks to be fixed indeed. Thanks!

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

I would say it's a bug because it should work, ngdoc builds angular template based on the template string, so angular syntax must work, I'll check and fix it, thanks!

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

Ah, I see, the problem is that it's being passed into the input that the playground is trying to recognize. If I add the ability to ignore certain inputs for the playground, will that solve your problem?

from ng-doc.

rubenprins avatar rubenprins commented on June 16, 2024

I'm not sure? Are you saying the reason this doesn't work right now (the inputs in the template are just gone after rendering), is because they're overwritten by input overrides/defaults, regardless of their template values, and then stripped because they have a default value?

If that's the case, and the "ignore these inputs for ng-doc template binding and leave them to Angular" would probably be what I need.

A simple test would be to allow the ng-doc icon demo to set the size or color input in the template and then ignore it in the playground setup, right?

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

The problem is that ngdoc defines toggleHiddenFor as an input, and for all inputs, ngdoc tries to determine the type and create a special control in the sidebar. It also binds the sidebar to the input of your component, thus overriding what you set in the template. So, the first option that came to mind is to create an exception list, where you could specify which inputs should not be bound and allow you to set its value in the template.

from ng-doc.

rubenprins avatar rubenprins commented on June 16, 2024

Got it. I'd be willing to test that PR out, if it's not too much work for you. Or tinker with the code myself to see if that works, if you can give me a pointer.

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

That'd be great! I'll let you know when PR is ready

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

Hey, in the new version, the issue should be fixed without any additional configuration required. I've decided that the builder itself can determine which inputs you've used in the template and can ignore them for playgrounds.

It seems to me that if you're passing a reference to an element or setting a value using Angular template syntax, generating a control for management in the sidebar is unnecessary. Because for setting default values for control, there's already another functionality in place.

So pls let me know how it works.

from ng-doc.

skoropadas avatar skoropadas commented on June 16, 2024

🎉 This issue has been resolved in version 17.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

from ng-doc.

rubenprins avatar rubenprins commented on June 16, 2024

There appears to be a bug when you use the component's attribute selector: the RotatorPlayground now gives a "Cannot read properties of undefined (reading 'length')" error when you change the template to <button [ngDocRotator]="true">Button</button>.

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.