2

I have a question regarding using AngularJS (or rather any other frontend JS framework).

We have been thinking to use AngularJS in our new project which will be publicly accessible. If we build the frontend app in AngularJS (or any other JS framework), then whole client code is accessible to anyone.

Even if we minify or uglify the code, then also can seen & decoded.

How we can build the app using JS Frameworks without loosing the IP of source code?

Thanks, Gourav.

  • 5
    It's impossible. If your clients can access your application and it's written in JS (which it has to be to run in a browser) then they can access the code. End of story. – Mike Cluck Jan 28 '16 at 00:29
  • Like @MikeC say, if is in the browser all the code is public, if you want to do that('secure the property'), you should keep all the business logic on the server and the client app (AngularJs or any other client side framework) just use it to present data to the user. – Omar Martinez Jan 28 '16 at 00:35
  • http://stackoverflow.com/questions/194397/how-can-i-obfuscateprotect-javascript – epascarello Jan 28 '16 at 00:42

1 Answers1

1

You can't 100% protect your code since your source is readable on the client machines. It's fairly easy to prettify JavaScript.

That being said, there are some companies out there that attempt to solve this problem. Some will even set "code traps". Search for "obfuscate javascript".

Here are a few I've found:

joelnet
  • 13,621
  • 5
  • 35
  • 49