ngInclude crash when file not exists

398 views
Skip to first unread message

Ribhararnus Pracutian

unread,
Mar 25, 2014, 1:09:54 PM3/25/14
to ang...@googlegroups.com
when file not exists my browser crash, is there a way to check if file not exists?

ev...@vfiles.com

unread,
Mar 26, 2014, 1:32:04 PM3/26/14
to ang...@googlegroups.com
This is not the place for questions like this. idk what your issue is (you did not describe it or post an example...), but you should be blaming your own code, not ngInclude -- ngInclude in isolation will NOT crash the browser on 404

Luke Kende

unread,
Mar 28, 2014, 2:44:21 AM3/28/14
to ang...@googlegroups.com
Actually, I've had similar issues.  In my case, if your 404 page also loads a template that still requests the same ng-include reference, then it gets stuck in a loop and will crash the browser.  It's not necessarily the fault of angular but it would be nice if the ng-include directive knew that it was loading a partial and instead of falling back to the $routeProvider's 404 method, would instead just fail or show a custom message.  

Ribhararnus Pracutian

unread,
Mar 28, 2014, 4:38:54 AM3/28/14
to ang...@googlegroups.com
I knows this issue when I accidentally mistypo filename in src attribute, I can't close my tab (google chrome), then I open devtools console, I think angular will looping the process until file exists. Oh FYI I'm using $routeProvider


--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/eJyyWdhTfS0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
-------------------------------
ribhararn.us/pracutian OknooRap, personal blog, Web design and Development
www.faktailmiah.com Indonesian Daily Science news

Ribhararnus Pracutian

unread,
Mar 28, 2014, 4:39:39 AM3/28/14
to ang...@googlegroups.com
* I'm using $routeProvider had similliar issue.
Reply all
Reply to author
Forward
0 new messages