@ngx-env/core
v16.1.3
Published
Easily inject environment variables into your Angular applications
Maintainers
Readme
@ngx-env/core
Easily inject environment variables into your Angular applications
Quick start
- Add @ngx-env to your CLI project
ng add @ngx-env/builder- Define Environment Variables in
.env
NG_APP_ENABLE_ANALYTICS=false
NG_APP_VERSION=$npm_package_version- Run CLI commands
npm start
NG_APP_BRANCH_NAME=`git branch --show-current` npm run build- Use the
envpipe
npm install @ngx-env/coreimport { NgxEnvModule } from "@ngx-env/core";
@NgModule({
declarations: [FoooterComponent],
imports: [CommonModule, NgxEnvModule],
})
export class FooterModule {}{{ 'process.env.NG_APP_ENV' | env }}
{{ 'NG_APP_ENV' | env }}
{{ 'NG_APP_BRANCH_NAME' | env }}License
MIT © Chihab Otmani
