當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript core.provideLazyMapsAPILoaderConfig函數代碼示例

本文整理匯總了TypeScript中angular2-google-maps/core.provideLazyMapsAPILoaderConfig函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript provideLazyMapsAPILoaderConfig函數的具體用法?TypeScript provideLazyMapsAPILoaderConfig怎麽用?TypeScript provideLazyMapsAPILoaderConfig使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了provideLazyMapsAPILoaderConfig函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: main

export function main(initialHmrState?: any): Promise<any> {

  //noinspection TypeScriptValidateTypes
  return bootstrap(AppComponent, [
    ...PROVIDERS,
    ...ENV_PROVIDERS,
    ...DIRECTIVES,
    ...PIPES,
    ...HTTP_PROVIDERS,
    ...ROUTER_PROVIDERS,
    ...GOOGLE_MAPS_PROVIDERS,
    RequestService,
    AuthService,
    provideLazyMapsAPILoaderConfig({ apiKey: 'AIzaSyDL7rTTuURd4I5jNb7YPoETRAqH6PZt_00'}),
    provide(AuthHttp, {
      useFactory: (http) => {
        return new AuthHttp(new AuthConfig({
          headerPrefix: 'JWT'
        }), http);
      },
      deps: [Http]
    }),
    provide(Window, {useValue: window})
  ])
    .catch(err => console.error(err));

}
開發者ID:valdemarrolfsen,項目名稱:tidbanken,代碼行數:27,代碼來源:main.ts

示例2: main

document.addEventListener('DOMContentLoaded', function main() {
    return bootstrap(App, [
        // These are dependencies of our App
        ...HTTP_PROVIDERS,
        ...ROUTER_PROVIDERS,
        ...ENV_PROVIDERS,
        GOOGLE_MAPS_PROVIDERS,
        provideLazyMapsAPILoaderConfig({ apiKey: 'AIzaSyAB3VwottxsX0DfgWphHisiyI2ZEy0FENU' })

    ])
        .catch(err => console.error(err));
});
開發者ID:dennoa,項目名稱:flood-risk-mapper,代碼行數:12,代碼來源:bootstrap.ts

示例3: bootstrap

        .catch(err => console.error(err));
});


/*
 * Modified for using hot module reload
 */

// typescript lint error 'Cannot find name "module"' fix
declare let module: any;

// activate hot module reload
if (module.hot) {

    // bootstrap must not be called after DOMContentLoaded,
    // otherwise it cannot be rerenderd after module replacement
    //
    // for testing try to comment the bootstrap function,
    // open the dev tools and you'll see the reloader is replacing the module but cannot rerender it
    bootstrap(App, [
        ...ENV_PROVIDERS,
        ...HTTP_PROVIDERS,
        ...ROUTER_PROVIDERS,
        GOOGLE_MAPS_PROVIDERS,
        provideLazyMapsAPILoaderConfig({ apiKey: 'AIzaSyAB3VwottxsX0DfgWphHisiyI2ZEy0FENU' })
    ])
        .catch(err => console.error(err));

    module.hot.accept();
}
開發者ID:dennoa,項目名稱:flood-risk-mapper,代碼行數:30,代碼來源:bootstrap.ts

示例4: provideLazyMapsAPILoaderConfig

import { FORM_PROVIDERS } from  '@angular/common';
import { HTTP_PROVIDERS } from '@angular/http';
import { ApiService } from './shared/services/api.service';
import { AuthService } from './shared/services/auth.service';
import { SearchParamsService } from './shared/services/search-params.service';
import { GlobalEventsService } from './shared/services/global-events.service';
import { BrowserSupportService } from './shared/services/browser-support.service';
import { EasterEggService } from './shared/services/easter-egg.service';
import { provideLazyMapsAPILoaderConfig, GOOGLE_MAPS_PROVIDERS } from 'angular2-google-maps/core';
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';

export const APP_PROVIDERS = [
  FORM_PROVIDERS,
  HTTP_PROVIDERS,
  ApiService,
  AuthService,
  SearchParamsService,
  GlobalEventsService,
  BrowserSupportService,
  EasterEggService,
  GOOGLE_MAPS_PROVIDERS,
  SlimLoadingBarService,
  provideLazyMapsAPILoaderConfig({
    apiKey: 'AIzaSyBE1Bb86PEGx-11LahjWCZS2cFOWMpNseI',
    libraries: ['places']
  })
];
開發者ID:adriancarriger,項目名稱:udacity-meetup,代碼行數:27,代碼來源:app.providers.ts

示例5: bootstrap

import { bootstrap }    from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
import {GOOGLE_MAPS_PROVIDERS, provideLazyMapsAPILoaderConfig} from 'angular2-google-maps/core';

import { appRouterProviders } from './app.routes';
bootstrap(AppComponent, [
    GOOGLE_MAPS_PROVIDERS, appRouterProviders, provideLazyMapsAPILoaderConfig({
        apiKey: 'AIzaSyCL-ew6If2qKce5J11w4mwARJIZH7joxCY'
    })
]);
開發者ID:sob95aero,項目名稱:first-ng2-app,代碼行數:10,代碼來源:main.ts

示例6: bootstrap

import { bootstrap }    from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
import { HTTP_PROVIDERS } from '@angular/http';
import {
  GOOGLE_MAPS_PROVIDERS,
  provideLazyMapsAPILoaderConfig
} from 'angular2-google-maps/core';

bootstrap(AppComponent, [
	HTTP_PROVIDERS,
	GOOGLE_MAPS_PROVIDERS,
  	provideLazyMapsAPILoaderConfig({ apiKey: 'AIzaSyDNw5kxIkzj-FXHh6tXyyfomrHViE2ySC4' })
  	]);
開發者ID:marciodsousa,項目名稱:trashr-web,代碼行數:13,代碼來源:main.ts

示例7: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic'
import { enableProdMode } from '@angular/core'
import { AppComponent, environment } from './app/'
import { appRouterProviders } from './app/app.routes'
import { HTTP_PROVIDERS } from '@angular/http'
import { disableDeprecatedForms, provideForms } from '@angular/forms'
import { LoggedInGuard } from './app/logged-in.guard'
import { UserService } from './app/user.service'
import {GOOGLE_MAPS_PROVIDERS, provideLazyMapsAPILoaderConfig} from 'angular2-google-maps/core'
import { Broadcaster } from './app/broadcaster'

if (environment.production) {
  enableProdMode()
}

bootstrap(AppComponent, [
    appRouterProviders,
    HTTP_PROVIDERS,
    disableDeprecatedForms,
    provideForms,
    UserService,
    LoggedInGuard,
    GOOGLE_MAPS_PROVIDERS,
    provideLazyMapsAPILoaderConfig({
      apiKey: 'AIzaSyAxocTsOHX8hICM5TMlgFeY0inINATgvg8',
    }),
    Broadcaster,
])
開發者ID:sk222sw,項目名稱:sk222sw.github.io,代碼行數:28,代碼來源:main.ts

示例8: bootstrap

import {provideRouter} from "@angular/router";

import {GOOGLE_MAPS_PROVIDERS,
        provideLazyMapsAPILoaderConfig} from "angular2-google-maps/core";

import {AppComponent} from "./component";
import {HomeComponent} from "./home/component";
import {InvitationComponent} from "./invitation/component";
import {GalleryComponent} from "./gallery/component";
import {MenuComponent} from "./menu/component";
import {AccessComponent} from "./access/component";
import {ContactComponent} from "./contact/component";
import {LoginComponent} from "./login/component";

import {AuthGuard} from "./utils";
import {mapsAPIKey} from "./constants";

var routes = [
    {path: "", component: InvitationComponent, canActivate: [AuthGuard]},
    {path: "invitation", component: InvitationComponent, canActivate: [AuthGuard]},
    {path: "gallery", component: GalleryComponent, canActivate: [AuthGuard]},
    {path: "menu", component: MenuComponent, canActivate: [AuthGuard]},
    {path: "access", component: AccessComponent, canActivate: [AuthGuard]},
    {path: "contact", component: ContactComponent, canActivate: [AuthGuard]},
    {path: "login", component: LoginComponent}
];

bootstrap(AppComponent, [provideRouter(routes), AuthGuard, GOOGLE_MAPS_PROVIDERS,
                         provideLazyMapsAPILoaderConfig({apiKey: mapsAPIKey})])
    .catch(err => console.error(err));
開發者ID:ramnes,項目名稱:22octobre,代碼行數:30,代碼來源:main.ts

示例9: enableProdMode

import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppComponent, environment } from './app/';

import {provideLazyMapsAPILoaderConfig, GOOGLE_MAPS_PROVIDERS} from 'angular2-google-maps/core';

if (environment.production) {
  enableProdMode();
}

bootstrap(AppComponent, [
  GOOGLE_MAPS_PROVIDERS,
  provideLazyMapsAPILoaderConfig({ apiKey: 'AIzaSyB0F3QWXtxJcZhAnZJkt5KTVaIHTmmNGlo'})
]);

開發者ID:jamesgraham10,項目名稱:audio-map,代碼行數:14,代碼來源:main.ts

示例10: enableProdMode

import { HTTP_PROVIDERS } from '@angular/http';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';

import {
  provideLazyMapsAPILoaderConfig,
  GOOGLE_MAPS_PROVIDERS,
} from 'angular2-google-maps/core';

import {
  AppComponent,
  NationService,
  LocationService,
  appRouterProviders,
  environment,
  googleConfig
} from './app';

if (environment.production) {
  enableProdMode();
}

bootstrap(AppComponent, [
  NationService,
  LocationService,
  appRouterProviders,
  { provide: LocationStrategy, useClass: HashLocationStrategy },
  HTTP_PROVIDERS,
  GOOGLE_MAPS_PROVIDERS,
  provideLazyMapsAPILoaderConfig(googleConfig.apiConfig)
]);
開發者ID:godiagonal,項目名稱:nations-client,代碼行數:30,代碼來源:main.ts


注:本文中的angular2-google-maps/core.provideLazyMapsAPILoaderConfig函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。