Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8932877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:24:24+00:00 2026-06-15T09:24:24+00:00

i have an HTML with 2 ng-includes. Consider if one of the ng-include src

  • 0

i have an HTML with 2 ng-includes. Consider if one of the ng-include src is not present in the server. as of now it would just load blank html and in the browser console it would say http-404 file not found.

So in this case, i want to load a Default Error page (which is present in server) into that particular div only, i.e one half showing Default Error Page and other with the proper div which was loaded via nginclude.

My logic is, am using an http interceptor, where i intercept all http calls.whenever a 404 happens, i want to return the Default Error page which must be loaded into the div only. so its like mocking a correct http call but sending a error page instead, which i assume must be loaded to the proper div.

But this isnt happeneing :). I tried with default window.load(”). But then it loads on top of the page and is present across pages.

Or should i capture the div id (if so how?) and then do tat id load the Default Error HTML?

Need your thought in this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:24:25+00:00Added an answer on June 15, 2026 at 9:24 am

    To handle this kind of situations you could use http interceptors (find the docs here: $http).

    Interceptor has to catch the 404 response, load the 404.html page from your server and
    set it as a data for the initial response along with the status code 200.

    I’ve created a project that shows how to solve it.

    Repository: https://github.com/matys84pl/angularjs-nginclude-handling-404/

    Take a closer look at the main.js file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have HTML which includes scripts in following order <script src=../static/js/jquery.js type=text/javascript> <script src=../static/js/bootstrap.js
I have layout.jade: html include includes/head body header h1 Jumplink design p web design+creative
I have been given a project - the one HTML page includes about 45
I have a HTML that includes a Javascript file. This script contains a special
I have a text file of HTML that includes the following marker set for
I have an HTML page with a web form. Among other things, it includes
I have a PHP script (index.php) that includes an index.html file in a sub-directory
I have the following directory structure : /script/x.js /includes/x.txt /1/2/index.html After hooking a webpage
Within my HTML, I have a php script that includes a file. At that
I have a html component that includes some javascript. The component is a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.