0

In the configuration file, can I reference one config from another? I am using environment.ts file.

    export const environment = {
     production: false,

    //Configuration parameters
     CONFIG_ADMIN_CREATE_KEY_MINSIZE: 5,
     CONFIG_ADMIN_CREATE_KEY_MAXSIZE: 20,
     CONFIG_ADMIN_CREATE_VALUE_MINSIZE: 5,
     CONFIG_ADMIN_CREATE_VALUE_MAXSIZE: 20,

      NEWTEST: "minimum size of text value is" + 
        this.CONFIG_ADMIN_CREATE_KEY_MINSIZE
   };
2
  • I see that i am getting the following output "minimum size of text value is"undefined Commented Nov 26, 2017 at 13:25
  • What exactly is the question? What have you tried so far? Commented Nov 26, 2017 at 13:36

1 Answer 1

1
const CONFIG_ADMIN_CREATE_KEY_MINSIZE = 5;

export const environment = {
  production: false,

  // Configuration parameters
  CONFIG_ADMIN_CREATE_KEY_MINSIZE,
  CONFIG_ADMIN_CREATE_KEY_MAXSIZE: 20,
  CONFIG_ADMIN_CREATE_VALUE_MINSIZE: 5,
  CONFIG_ADMIN_CREATE_VALUE_MAXSIZE: 20,

  NEWTEST: `minimum size of text value is ${CONFIG_ADMIN_CREATE_KEY_MINSIZE}`
};
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.