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

  • Home
  • SEARCH
  • 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 8604221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:31:11+00:00 2026-06-12T02:31:11+00:00

I want to use $document to grab a server value from an input field.

  • 0

I want to use $document to grab a server value from an input field.

var base_url = $document[0].getElementById('BaseUrl').value;

The base url is used for grabbing templates.

var base_url = $document[0].getElementById('BaseUrl').value;

$routeProvider.when('/alert', {
  controller: function () { },
  templateUrl: base_url + '/partials/instances.html'
});

Since $document throws an error that it’s unknown I am guessing that it’s not available at config? Is there a way to find out what is available and what not? I could also use $http to get data from the server but that’s also not available.

  • 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-12T02:31:12+00:00Added an answer on June 12, 2026 at 2:31 am

    AngularJS modules are bootstrapped in 2 phases:

    • Configuration phase where only providers and constants are available.
    • Run phase where services are instantiated based on registered providers. In this phase constants are still available but not providers.

    The AngularJS documentation (section: “Module Loading & Dependencies”) gives the insight into this:

    A module is a collection of configuration and run blocks which get
    applied to the application during the bootstrap process. In its
    simplest form the module consist of collection of two kinds of blocks:

    Configuration blocks – get executed during the provider registrations
    and configuration phase. Only providers and constants can be injected
    into configuration blocks. This is to prevent accidental instantiation
    of services before they have been fully configured.

    Run blocks – get
    executed after the injector is created and are used to kickstart the
    application. Only instances and constants can be injected into run
    blocks. This is to prevent further system configuration during
    application run time.

    Given the above you can only inject constants and providers (marked with the Provider suffix in the API docs). This probably answers your question but doesn’t help to solve your problem of templates loading…

    I wonder if you couldn’t simply use the base tag in HTML and then simply use relative paths (to the base) without specifying absolute paths? Sth like (provided that the base is correctly configured):

    $routeProvider.when('/alert', {
      controller: function () { },
      templateUrl: 'partials/instances.html'
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use document.getElementById in the src of script tag like this: <div
I want to use Linq to extract data from an XML document and place
I want to grab an image from my DB, and use that as the
Sorry to follow this topic http://stackoverflow.com/questions/11044825/javascript-run-on-ie-7 I want to use document.GetElementByClassName ON INTERNET EXPLORE
So I want to use memoir document class and the ntheorem package with the
I'm working on a document-based application, and I want to use a document package
I want to use Python to access MFC document files generically? Can CArchive be
HI, I want to use FOP to prepare a XML document for printing (ps/pdf).
I'd like to create a Word document using Python, however, I want to re-use
I want to prepare a text for the use in a LaTeX document. I

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.