Git Product home page Git Product logo

Comments (6)

chihab avatar chihab commented on July 27, 2024

Could you set the "unsecure" flag to true in your angular.json file and share the output please?

image

from ngx-env.

chihab avatar chihab commented on July 27, 2024

Does console.log(import.meta.env.YOUR_ENV_VAR) display the environment variable?

Actually @ngx-env/builder (through esbuild) replaces "import.meta.env.YOUR_ENV_VAR" in your source code by the actual values from your environment. The expression import.meta.env itself is not replaced or mutated.

from ngx-env.

russelporosky avatar russelporosky commented on July 27, 2024

unsecure doesn't seem to do anything - what was expected?

Console logging the specific var doesn't display anything, same as trying to use it in a component.

from ngx-env.

chihab avatar chihab commented on July 27, 2024

Could you please share the output in the console of npm start?

from ngx-env.

russelporosky avatar russelporosky commented on July 27, 2024

Figured it out by accident. I used the same var names the demo uses and it worked, and then I realized they have to start with NG_APP_ (although _NG_APP works as well - maybe it just needs that text anywhere in the name).

That should be documented. I wasted a goodish amount of time expecting APP_API_URL and FIREBASE_STORAGE to work.

from ngx-env.

chihab avatar chihab commented on July 27, 2024

Sorry for that, still restructing the docs and working on https://dotenv.run.

The original @ngx-env/builder documentation is here https://github.com/chihab/dotenv-run/tree/main/packages/angular

from ngx-env.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.