title: Angular2 - Nebular theme API endpoints
body: <p>I am developing application under Angular2 and I choose Nebular frontend - <a href="https://akveo.github.io/nebular/#/home" rel="nofollow noreferrer">https://akveo.github.io/nebular/#/home</a></p>
  
  <p>Documentation is not really detailed for me and I am not expert in Angular2.</p>
  
  <p>I am struggling in part - API endpoints <a href="https://akveo.github.io/nebular/#/docs/auth/configuring-a-provider" rel="nofollow noreferrer">https://akveo.github.io/nebular/#/docs/auth/configuring-a-provider</a></p>
  
  <p>Where I can save the API basepoint? In which file or part of file?</p>
  
  <p>Affected code:</p>
  
  <pre><code>{
   baseEndpoint: 'http://...
  ...
  </code></pre>
  
  <p>My code (core.module.js):</p>
  
  <pre><code>import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { NbEmailPassAuthProvider, NbAuthModule } from '@nebular/auth';
  
  import { throwIfAlreadyLoaded } from './module-import-guard';
  import { DataModule } from './data/data.module';
  import { AnalyticsService } from './utils/analytics.service';
  
  import { environment } from './../../environments/environment';
  
  const NB_CORE_PROVIDERS = [
    ...DataModule.forRoot().providers,
    ...NbAuthModule.forRoot({
      providers: {
        email: {
          service: NbEmailPassAuthProvider,
          config: {
            delay: 3000,
            login: {
              rememberMe: true,
            },
          },
        },
      },
      forms: {
        validation: {
          password: {
            required: true,
            minLength: 6,
            maxLength: 255,
          },
          email: {
            required: true,
          }
        }
      }
    }).providers,
    AnalyticsService
  ];
  
  @NgModule({
    imports: [
      CommonModule,
    ],
    exports: [
      NbAuthModule,
    ],
    declarations: [],
  })
  export class CoreModule {
    constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
      throwIfAlreadyLoaded(parentModule, 'CoreModule');
    }
  
    static forRoot(): ModuleWithProviders {
      return &lt;ModuleWithProviders&gt;{
        ngModule: CoreModule,
        providers: [
          ...NB_CORE_PROVIDERS,
        ],
      };
    }
  }
  </code></pre>