I have div1 and div2.
If a user is admin I want him to see both of them.
If a user is a simple user, I want him to see only div2.
I used ng-if (beacuse it removes the div completely, and not using display:none)
Is it safe? Can it be intercepted and/or changed by proxy tools and/or chrome developer tools.
I didn't find any info on that.
Since all AngularJs code is client side, directives like ng-if will not protect you from proxy tools that target HTTP.
So, it depends what you mean be safe. If you are providing sensitive information from the server, then no UI pattern/tool will secure that information.
Usually in SPA applications, security is applied to the server API that the client is speaking to. The UI should be treated as under the control of the user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With