1

users have permission to go over menu.

when A user need menu_1.js file but B user don't need menu_1.js file as well as haven't to go there

I want to read needing js file in index.html in angular.js ver 1.x.

Can I resolve this?

Thank u your answer.

4
  • Yes, you can. There's a way to include such script just for specific user in js Commented Nov 21, 2016 at 2:37
  • You can use multiple ui-view in such kind of problem. Commented Nov 21, 2016 at 2:39
  • I'm going to add route provide in controller and then index.html includes such this controller. cause menu don't want to come a user who don't have permission. Commented Nov 21, 2016 at 4:44
  • so I don't want I use ng-if or ng-view etc. just I want index.html to include jsfile Dynamically. Commented Nov 21, 2016 at 4:46

1 Answer 1

1

Something like this might help

<footer ng-if="userA">
<!-- Call the script here -->
</footer>

<footer ng-if="userB">
<!-- Call the script here -->
</footer>

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you. but I don't need this. cause this way has problem. if B user know menu_1 url, B user can go there.
You can check that in .run() method @EddyKim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.