Hi all -

New to this group... :-)

I have created my first Angular 2 app, and have deployed it to a local 
Apache server on my computer.


   1. In my index.html, I have deleted the the <base href="/"> line.
   2. In my app.module.ts file, I have imported the APP_BASE_HREF line, as 
   well as the content within the curly-brackets within "providers".
   

*/* OTHER IMPORTS RESIDE HERE*/*


import {APP_BASE_HREF} from '@angular/common';

@NgModule({
   declarations: [
      AppComponent,
   ],
   imports: [

      BrowserModule,

      routing,
      
   ],
   providers: [UserService, {provide: APP_BASE_HREF, useValue : 
'/admin-dashboard' }],
   bootstrap: [AppComponent]
})
export class AppModule {


*BTW: I found that the same could be achieved skipping # 2, and setting by 
base href like this:<base href="./"> ...with a period before the slash.*

What I am trying to achieve is to run my app in a sub folder under Apache 
(on XAMPP - htdocs/admin-dashboard).
With the setting above, it works well...but my issue is as following:


   1. If I refresh (Cmd + R in Google Chrome on a Mac) a page with the 
   url..i.e. http://localhost/admin-dashboard/database/tracker....I get an 
   "Object not found!" page.
   2. If I right-click in my menu and try to open the same page as under # 
   1 in a new window or tab...I get an "Object not found!" page.
   3. If I copy the URL, and paste and run it in a new tab...I get the same 
   as above...

So...I am getting tired of using hours on the Internet... Anyone have an 
idea what my issue is? The app works well if I use my menu...in the same 
browser window.
Is something messed up with my routing...?

~ TJ

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to