Giter VIP home page Giter VIP logo

Comments (3)

jongunter avatar jongunter commented on August 16, 2024

This apparently occurs when the @name of two components is the same. The URL of each component's docs is generated from the @name. The ng-repeats in the nav bars track by the component's url. Thus, generating the dupe errors.

In in ideal world, the name of two components would never be the same (or else they wouldn't work in the same angular app). However, often our devs copy ncdoc templates and forget to change the default name. In that case, a problem like this shouldn't break major functionality of the documentation web site.

Thus, I'm tempted to submit a PR and remove the track by statement from the ng-repeats in the main template. I imagine they are there for a reason, however.

from gulp-ngdocs.

EruantalonJS avatar EruantalonJS commented on August 16, 2024

I don't think removing the "track by" is an option since it could have a severe impact on performance.

In my opinion, having repeated names should trigger a warning/error during the generation of the docs, so that the dev notices the repeated name and can fix it right away. Would that be acceptable for you?

from gulp-ngdocs.

ITAndy23 avatar ITAndy23 commented on August 16, 2024

This is still an issue for me. Anyone else? I don't have dupe @name documentation in my code. Some how, the source files are creating repeat entries in docs-setup.js.
image

If i take off the id to loop on in the repeater you can see the repeat directives:
image

I know this isn't the best place to try to fix it, but i've found if you go into index.js and around line 264 add unique filter:
setup.pages = _.uniq(setup.pages, page => page.id);

from gulp-ngdocs.

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.