Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix($templateRequest): give tpload error the correct namespace
Browse files Browse the repository at this point in the history
BREAKING CHANGE

Previously the `tpload` error was namespaced to `$compile`. If you have
code that matches errors of the form `[$compile:tpload]` it will no
longer run. You should change the code to match
`[$templateRequest:tpload]`.
  • Loading branch information
petebacondarwin committed Feb 20, 2018
1 parent 56b6ba8 commit c617d6d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
11 changes: 0 additions & 11 deletions docs/content/error/$compile/tpload.ngdoc

This file was deleted.

18 changes: 18 additions & 0 deletions docs/content/error/$templateRequest/tpload.ngdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@ngdoc error
@name $templateRequest:tpload
@fullName Error Loading Template
@description

This error occurs when {@link $templateRequest} attempts to fetch a template from some URL, and
the request fails.

The template URL might be defined in a directive/component definition, an instance of `ngInclude`,
an instance of `ngMessagesInclude` or a templated route in a `$route` route definition.

To resolve this error, ensure that the URL of the template is spelled correctly and resolves to
correct absolute URL.
The [Chrome Developer Tools](https://developers.google.com/chrome-developer-tools/docs/network#network_panel_overview)
might also be helpful in determining why the request failed.

If you are using {@link ng.$templateCache} to pre-load templates, ensure that the cache was
populated with the template.
2 changes: 1 addition & 1 deletion src/ng/templateRequest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var $templateRequestMinErr = minErr('$compile');
var $templateRequestMinErr = minErr('$templateRequest');

/**
* @ngdoc provider
Expand Down

1 comment on commit c617d6d

@Narretz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made some test in compile fail that assert against the error identifier

Please sign in to comment.