Socket
Book a DemoInstallSign in
Socket

@ngx-env/core

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngx-env/core

Easily inject environment variables into your Angular applications

latest
npmnpm
Version
16.1.3
Version published
Weekly downloads
464
-8.84%
Maintainers
1
Weekly downloads
 
Created
Source

@ngx-env/core

npm version

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 env pipe
npm install @ngx-env/core
import { 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

Keywords

angular

FAQs

Package last updated on 30 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts