web app created using angularjs showing my code in web

40 views Asked by At

I created a web app in mvc 5, using angularjs as controller but the problem is, all my code of my app will be shown if i click on inspect in google chrome, i don't want to show my coding to any user, how can i prevent the user to view my coding,

and is angularjs is less safer then c# and is there any way (by coding) to prevent all the users to view our code in insect element

i know this is not exactly related to coding, but my app has the transacion related to banks

1

There are 1 answers

0
Haitham Shaddad On BEST ANSWER

This is normal with any web application that depends on client side scripting language.

JavaScript should be only used to handle the user interface flow and interactions, the business logic and persistence should be handled in the back end.

You should never trust any data coming from the UI, always validate it before retrieval or saving.

As for the code that is visible, you can always minify the JavaScript files, this will make it at least harder for anyone to inspect and understand the code