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


TypeScript ng2-ui-auth.NG2_UI_AUTH_PROVIDERS函數代碼示例

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


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

示例1: main

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

//alert('dddee');

  return bootstrap(App, [
		
    ...PROVIDERS,
    ...ENV_PROVIDERS,
    ...DIRECTIVES,
    ...PIPES,
    ...APP_PROVIDERS,
    ...APP_STORES,
      SharedService,
      UserService,
	  NG2_UI_AUTH_PROVIDERS({defaultHeaders: DEFAULT_POST_HEADER, providers: {google: {clientId: GOOGLE_CLIENT_ID}}}),
      provide(LazyMapsAPILoaderConfig, {
          useFactory: () => {
              let config = new LazyMapsAPILoaderConfig();
              config.libraries = ['places'];
              return config;
          }
      })


  ])
  .catch(err => console.error(err));
}
開發者ID:foodrings,項目名稱:foodrings,代碼行數:27,代碼來源:main.browser.ts

示例2: beforeEach

    beforeEach(() => {
      // Support for testing component that uses Router
      let config:RouterConfig = [];

      addProviders([
        provideFakeRouter(TestComponent, config),
        Configuration,
        FormBuilder,
        Auth,
        HTTP_PROVIDERS,
        MockBackend,
        {provide: XHRBackend, useExisting: MockBackend},
        NG2_UI_AUTH_PROVIDERS(
          {
            baseUrl: 'any',
            providers: {
              facebook: {
                clientId: ''
              },
              google: {
                clientId: ''
              }
            }
          }),
        AuthService,
        MeetService
      ]);

    });
開發者ID:everve,項目名稱:slsplay,代碼行數:29,代碼來源:meet-detail.component.spec.ts

示例3: beforeEach

    beforeEach(() => {

      // Support for testing component that uses Router
      let config:RouterConfig = [
        {path: '', component: HomeComponent},
        {path: 'about', component: AboutComponent}
      ];
      var BASE_API = new OpaqueToken('slsServiceApi');

      addProviders([
        provideFakeRouter(TestComponent, config),
        Configuration,
        Auth,
        HTTP_PROVIDERS,
        MockBackend,
        {provide: XHRBackend, useExisting: MockBackend},
        {provide: BASE_API, useValue: '<%= API %>'},
        NG2_UI_AUTH_PROVIDERS(
          {
            baseUrl: BASE_API.toString(),
            providers: {
              facebook: {
                clientId: ''
              },
              google: {
                clientId: ''
              }
            }
          }),
        AuthService
      ]);
    });
開發者ID:everve,項目名稱:slsplay,代碼行數:32,代碼來源:app.component.spec.ts

示例4: main

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

//alert('dddee');

  return bootstrap(App, [
		
    ...PROVIDERS,
    ...ENV_PROVIDERS,
    ...DIRECTIVES,
    ...PIPES,
    ...APP_PROVIDERS,
    ...APP_STORES,
      SharedService,
      UserService,
	  NG2_UI_AUTH_PROVIDERS({defaultHeaders: DEFAULT_POST_HEADER, providers: {google: {clientId: GOOGLE_CLIENT_ID}}}),

  ])
  .catch(err => console.error(err));
}
開發者ID:Anhmike,項目名稱:angular2-shop,代碼行數:19,代碼來源:main.browser.ts

示例5: bootstrap

/**
 * Bootstraps the application and makes the ROUTER_PROVIDERS and the APP_BASE_HREF available to it.
 * @see https://angular.io/docs/ts/latest/api/platform-browser-dynamic/index/bootstrap-function.html
 */
bootstrap(AppComponent, [
  Configuration,
  disableDeprecatedForms(),
  provideForms(),
  HTTP_PROVIDERS,
  APP_ROUTER_PROVIDERS,
  NG2_UI_AUTH_PROVIDERS(
    {
      baseUrl: configuration.API,
      providers: {
        facebook: {
          clientId: configuration.FACEBOOK_CLIENT_ID
        },
        google: {
          clientId: configuration.GOOGLE_CLIENT_ID
        }
      }
    }),
  {provide: APP_BASE_HREF, useValue: '<%= APP_BASE %>'},
]);

// In order to start the Service Worker located at "./worker.js"
// uncomment this line. More about Service Workers here
// https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
//
// if ('serviceWorker' in navigator) {
//   (<any>navigator).serviceWorker.register('./worker.js').then((registration: any) =>
//       console.log('ServiceWorker registration successful with scope: ', registration.scope))
開發者ID:everve,項目名稱:slsplay,代碼行數:32,代碼來源:main.ts

示例6: bootstrap

import { APP_ROUTER_PROVIDERS } from './app.routes';
import { AppComponent } from './app.component';
import {
  ANGULAR2_GOOGLE_MAPS_PROVIDERS
} from 'angular2-google-maps/core';

const GOOGLE_CLIENT_ID = '642712098499-uqphekumjjgp2idhosahbdlvvs2g4i44.apps.googleusercontent.com';
const FACEBOOK_CLIENT_ID = '217136761769180';
const DEFAULT_POST_HEADER: {[name: string]: string} = {
  'Content-Type': 'application/json',
  'Access-Control-Allow-Origin': '*',
  'Access-Control-Allow-Methods': 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
  'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token'
};

bootstrap(AppComponent, [
  provide(APP_BASE_HREF, {useValue : '/' }),
  APP_ROUTER_PROVIDERS,
  HTTP_PROVIDERS,
  ANGULAR2_GOOGLE_MAPS_PROVIDERS,
  NG2_UI_AUTH_PROVIDERS({
    defaultHeaders: DEFAULT_POST_HEADER,
    providers: {
      facebook: {
        clientId: FACEBOOK_CLIENT_ID,
        url: 'http://localhost:8080/auth/facebook'
      },
    }
  })
]);
開發者ID:lowdev,項目名稱:pingponger,代碼行數:30,代碼來源:main.ts

示例7: enableProdMode

const GOOGLE_CLIENT_ID = '616075536950-pauau0e7u0c980llqh99ftvg3sd32c61.apps.googleusercontent.com';
const GITHUB_CLIENT_ID = '54c368d51bca18a17397';
const API_SERVER = 'https://p.davintoo.com';

enableProdMode();
bootstrap(AppComponent, [
    LoggerService,
    GithubService,
    ConfigService,
    AuthService,
    GoogleService,
    ToastrService,
    TetherService,
    ROUTER_PROVIDERS,
    HTTP_PROVIDERS,
    NG2_UI_AUTH_PROVIDERS({
        defaultHeaders: {
            'Content-Type': 'application/json; charset=utf-8'
        },
        providers: {
            google: {clientId: GOOGLE_CLIENT_ID, scope: [
                'https://www.googleapis.com/auth/userinfo.profile',
                'https://www.googleapis.com/auth/drive.file',
                'https://www.googleapis.com/auth/drive.install'
            ], url: API_SERVER + '/auth/google' },
            github: {clientId: GITHUB_CLIENT_ID, scope: ['user:email,repo,gist'], url: API_SERVER + '/auth/github'}
        }
    })
]);
開發者ID:millionbots,項目名稱:angularattack2016-eliftech,代碼行數:29,代碼來源:main.ts


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