title: How to normalize URL's in an Angular app to resolve correctly when the app is "self hosted" or "integrated"
body: <p>In this question "integrated" refers to an angular app invoked from some path within another web app, whereas, "self hosted" refers to running from a tools such as VS Code using the <code>ng serve  --open</code> command where the root url is set to the src folder.</p>
  
  <p>In MVC there are directives such as <code>Url.Action()</code> and <code>Url.Conntent()</code> that can be used to normalize relative pathing at any location within the app. </p>
  
  <p>I have been reading about APP_BASE_REF, however, I don't think that will work. Is it possible to use a mechanism that would allow a similar construct as  --> <code>&lt;img ng-fromAppRoot('~/assets/my.png')&gt;</code>. </p>
  
  <p>Also, in css constructs such as <code>background:url("~/assets/my.png")</code> will work in "integrated" but not "self hosted" and vice/versa.</p>
  
  <p>Passing the root url in as part of the app initializer when "Integerated" may be part of the solution.</p>
  
  <p>How is this usually handled, I am looking for a solution that will not require code changes to switch between debug/release?</p>