Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comma gets inserted in deckgrid template #85

Open
dorthrithil opened this issue Jun 7, 2015 · 3 comments
Open

Comma gets inserted in deckgrid template #85

dorthrithil opened this issue Jun 7, 2015 · 3 comments

Comments

@dorthrithil
Copy link

If you provide the template via the inner HTML option, a <span class="ng-scope">,</span> element is added between all direct child elements of the .deckgrid div.

So if you define a template like

<div deckgrid source="..." class="deckgrid">
  <div>...</div>
  <div>...</div>
</div>

each card will be displayed as

  <div>...</div>
  <span class="ng-scope">,</span>
  <div>...</div>

You can easily work around this by adding a parent div which wraps the whole template but the whole issue first was really confusing. Is this comma inserting intended?

@mjhasbach
Copy link

+1

1 similar comment
@rparrapy
Copy link

+1

@caffeinewriter
Copy link

I know this is years later, but I figured out the root cause. It seems to have to do with inserting into the template cache, and relying on .join()'s default string.

In a quick test on Chrome 60.0.3112.113, running ["test", "string", "here"].join(), returns "test,string,here". Adding a parent div fixes this issue since it gives the join only a single element to the array, so no commas are added. It doesn't look like pull requests are being accepted, but the fix should be as simple as changing .join(), to .join(""). I'll throw together a pull request when I have the chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants