Created
June 7, 2017 14:58
-
-
Save matthieu-D/a1912df7c1058daed4677eff8a1deb94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
declare var AWS: any; | |
declare const aws_mobile_analytics_app_id; | |
declare const aws_cognito_region; | |
declare const aws_cognito_identity_pool_id; | |
declare const aws_user_pools_id; | |
declare const aws_user_pools_web_client_id; | |
declare const aws_user_files_s3_bucket; | |
@Injectable() | |
export class AwsConfig { | |
public load() { | |
// Expects global const values defined by aws-config.js | |
const cfg = { | |
"aws_mobile_analytics_app_id": aws_mobile_analytics_app_id, | |
"aws_cognito_region": aws_cognito_region, | |
"aws_cognito_identity_pool_id": aws_cognito_identity_pool_id, | |
"aws_user_pools_id": aws_user_pools_id, | |
"aws_user_pools_web_client_id": aws_user_pools_web_client_id, | |
"aws_user_files_s3_bucket": aws_user_files_s3_bucket | |
}; | |
AWS.config.customUserAgent = AWS.config.customUserAgent + ' Ionic'; | |
return cfg; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment