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