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

ngRroute : Empty html template returns "Failed to load template" #9581

Closed
ramigb opened this Issue Oct 13, 2014 · 6 comments

Comments

Projects
None yet
4 participants
@ramigb
Copy link

commented Oct 13, 2014

When i try to load an empty template -blank html page- i get the following errors "Failed to load template".

I am using version "1.3.0-rc.5", tried it on Chrome and FireFox latest builds.

@caitp

This comment has been minimized.

Copy link
Contributor

commented Oct 13, 2014

This is a $templateRequest bug :( Sigh ._.

@caitp caitp added this to the 1.3.0 milestone Oct 13, 2014

@caitp

This comment has been minimized.

Copy link
Contributor

commented Oct 13, 2014

Just FYI, it "should" work for you if you use template rather than templateUrl, so that's a quick fix until there's a proper fix in the tree.

@ramigb

This comment has been minimized.

Copy link
Author

commented Oct 13, 2014

@caitp, it's not affecting me, i just noticed it while i was working, quickly googled it couldn't find any match so i thought i'd submit it, first time submitting a bug to angularjs repo, i hope i helped 🎅

@Narretz

This comment has been minimized.

Copy link
Contributor

commented Oct 13, 2014

The commit (a70e283) mentions empty templates causing errors as a Breaking Change. I'd say yes, because ng-view with an empty template doesn't really make sense. The question is if that makes sense. Maybe we should just tweak the error message?

@caitp

This comment has been minimized.

Copy link
Contributor

commented Oct 13, 2014

It's a bollocks error with no meaningful reason for existing, actually. While logging a message wouldn't be seriously harmful, some people actually find the empty template behaviour useful and it's been asked for by others, though don't ask me why.

There's no issue with element transclusion because the content fill directive is a different directive from the element transclusion issue. It's just an arbitrary "we will throw for no reason here because lol" thing.

cmichal pushed a commit to cmichal/angular.js that referenced this issue Oct 21, 2014

Michal Cieplucha
fix(templateRequest): allow empty html template
allow empty html template and not throw error

Closes angular#9581

cmichal added a commit to cmichal/angular.js that referenced this issue Oct 21, 2014

fix(templateRequest): allow empty html template
allow empty html template and not throw error

Closes angular#9581

cmichal added a commit to cmichal/angular.js that referenced this issue Oct 21, 2014

fix(templateRequest): allow empty html template
allow empty html template and not throw error

Closes angular#9581

cmichal added a commit to cmichal/angular.js that referenced this issue Oct 21, 2014

fix(templateRequest): allow empty html template
allow empty html template and not throw error

Closes angular#9581

@vojtajina vojtajina closed this in 52ceec2 Oct 21, 2014

@amrnt

This comment has been minimized.

Copy link

commented Oct 21, 2014

kudos @ramigb 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.