I am using angular 8 and want to use CI/CD. till now I am storing secret key in environment file. for development I have created environment.dev.ts and for production it will environment.prod.ts.
While I am using CI/CD so I am thinking that instead storing it in environment file store it in bitbucket variables. and while deploying the variable can be changed.
I know if created variable SECRETKEY in bitbucket pipeline then I can use it like $SECRETKEY in package.json. can I use this in same way in any where in angular. like in environment.dev.ts or environment.prod.ts