Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Conversation

@dhbaird
Copy link
Contributor

@dhbaird dhbaird commented Jul 28, 2013

No description provided.

ProLoser added a commit that referenced this pull request Jul 30, 2013
Adding demo/index.html for uiInclude.
@ProLoser ProLoser merged commit 02b791a into angular-ui:master Jul 30, 2013
@dhbaird
Copy link
Contributor Author

dhbaird commented Jul 31, 2013

@douglasduteil - Good catch! When fragment is falsey (empty string, undefined, etc.), it turns into an infinite loop, right? That make sense to me. But the weird thing is that when I actually test this code in Firefox and Chrome, it only includes the partial content once (no infinite loop). Why it does not recurse has me pretty confused, and that's how this issue slipped right past me.

#85 should resolve this, by refactoring the partials into a separate file 'include-partials.html'.

Another question is raised here: what should happen when fragment is specified, but its value is falsey or invalid (not a string)? I'm inclined that it should include nothing (unlike what it does now, which is to include the whole document).

@douglasduteil
Copy link
Contributor

When fragment is falsey (empty string, undefined, etc.), it turns into an infinite loop, right?

No I don't think so (I didn't test it). The infinite loop comes when you are including a file that includes itself.

what should happen when fragment is specified, but its value is falsey or invalid (not a string)?

For my you have to raise a kind of InvalidArgumentException

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants