---
title: "Comment by mKoliwad on \"How to keep your secrets from your source code in an Angular project ?! 🤫\" | Hashnode"
description: "Hi I am trying to implement the solution using this guide, Question: To read the GOOGLE_API_KEY from &quot;environment.ts&quot; file? we need to reference it in"
url: "https://hashnode.com/posts/how-to-keep-your-secrets-from-your-source-code-in-an-angular-project/6150445894bb297e1aad7f8d/comment/63751ad4cc42566334374777"
---

[Discussion](https://hashnode.com/posts/how-to-keep-your-secrets-from-your-source-code-in-an-angular-project/6150445894bb297e1aad7f8d)

Comment [How to keep your secrets from your source code in an Angular project ?! 🤫](https://hashnode.com/posts/how-to-keep-your-secrets-from-your-source-code-in-an-angular-project/6150445894bb297e1aad7f8d)

[mKoliwad](https://hashnode.com/@mKoliwad)

[Nov 16, 2022](https://hashnode.com/posts/how-to-keep-your-secrets-from-your-source-code-in-an-angular-project/6150445894bb297e1aad7f8d/comment/63751ad4cc42566334374777)

Hi I am trying to implement the solution using this guide,

Question: To read the GOOGLE\_API\_KEY from "environment.ts" file? we need to reference it in different file. for example: test.ts

I am getting the following error "src/environments/environment.ts' is not a module." as environment.ts file is added to .gitignore section.

Please help me how to overcome this?
