• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript ng2-ui-auth.NG2_UI_AUTH_PROVIDERS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript ng2-ui-auth.Auth类代码示例发布时间:2022-05-25
下一篇:
TypeScript ng2-translate.TranslateService类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap