-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Error event on ngInclude is needed. #5803
Comments
I don't think this is a totally desirable feature, but maybe. I have nothing better to do atm so I'll write up a quick implementation. Shouldn't take more than 10 minutes. |
This adds a scope event notification when a template fails to load. This can have performance implications, and unfortunately cannot at this moment be terminated with preventDefault(). But it's nice to be notified when problems occur! Closes angular#5803
The reason we would like it is that we have a ng-include that serves up a page created from asp. if we get a 404 nothing displays in our frame and we would like to display a message at this time. We don't want to do the http interceptor because it is only in this one page. and not all of the request would need this. we made the change on our local version of angular 1.2.7 and it seems to work fine. I don't think this is a totally desirable feature, but maybe. I have nothing better to do atm so I'll write up a quick implementation. Shouldn't take more than 10 minutes. — |
as much as I don't like adding more stuff to ngInclude, it is true that we already have support for |
To track whether content loading is a success or a failure (to handle failures in a special way for that include) it'd be nice to have this feature. Right now, I guess we have no way to know (except intercepting requests. |
This adds a scope event notification when a template fails to load. This can have performance implications, and unfortunately cannot at this moment be terminated with preventDefault(). But it's nice to be notified when problems occur! Closes angular#5803
It would be nice to have $includeContentErrorRequested or something like it for ng-include so we would know if the error path on the $http if fired.
The text was updated successfully, but these errors were encountered: