Comments (11)
@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.
@skoropadas Looks to be fixed indeed. Thanks!
from ng-doc.
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.
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.
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.
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.
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.
That'd be great! I'll let you know when PR is ready
from ng-doc.
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.
🎉 This issue has been resolved in version 17.6.4 🎉
The release is available on:
v17.6.4
- GitHub release
Your semantic-release bot 📦🚀
from ng-doc.
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)
- Amazing Work HOT 1
- [Feature] Use Relative Import Path in Generated Code HOT 3
- [Bug] `@ng-doc/builder:dev-server` Schema Validation Error When the `ngDoc` Propertiy is Provided HOT 15
- [Feature] Support `.js` Version of Ng Doc Configuration File HOT 4
- [Feature] Use Dark Theme by Default HOT 7
- [Docs] Update ng-doc path in docs HOT 2
- [Feature] Remove Google Fonts HOT 4
- [Bug] ng-doc.routing.ts incorrect generated import HOT 10
- [Bug] input aliasing decorator selector not rendered correctly HOT 4
- [Bug] hidden: true in NgDocPage-Config does not avoid displaying a component in the navigation. HOT 7
- [Bug] Table of contents link does not work properly with basehref HOT 4
- [Bug] Unable to leverage Keywords to create custom links in a reusable macro template HOT 8
- [Feature] Unable to leverage Custom Angular Components in the Markdown file HOT 3
- Support for Mermaid HOT 7
- [Bug] Unable to build docs when Playground refers components from angular library HOT 3
- [Bug] Extra /docs is introduced in the home icon of the breadcrumb during configuration of NgDoc route prefix HOT 2
- [Bug] Unable to display demo details of the components from angular library HOT 2
- [Query] Is it possible to import macros from angular library? HOT 3
- [Bug]Unable to customize the title of the API page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-doc.