Created
August 18, 2018 03:05
-
-
Save seangwright/b4fd913cebe3c85e10e61fdfedaf82a4 to your computer and use it in GitHub Desktop.
blog-best-way-to-use-angular-environment--environment.ts
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
/* | |
* In development mode, to ignore zone related error stack frames such as | |
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can | |
* import the following file, but please comment it out in production mode | |
* because it will have performance impact when throw error | |
*/ | |
import 'zone.js/dist/zone-error'; // Included with Angular CLI. | |
import { IEnvironment } from '@environments/ienvironment'; | |
// This file can be replaced during build by using the `fileReplacements` array. | |
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. | |
// The list of file replacements can be found in `angular.json`. | |
const apiHost = 'my-special-site.com'; | |
const apiUrl = `http://${apiHost}/api`; | |
export const environment: IEnvironment = { | |
production: false, | |
enableDebugTools: true, | |
logLevel: 'debug', | |
apiHost, | |
apiUrl, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment