0

I'm starting a MEAN app without prior experience. I was wondering whether there was any best practices about dynamic content such as highlighting active links from a layout or displaying the user's name.

There may be many different ways to do this, but I'm considering two here.

Using Pug (Jade):

Jade: Change active menu item in parent template

Using Angular:

How to set bootstrap navbar active class with Angular JS?

Does it make any difference at all?

Community
  • 1
  • 1
Funkatic
  • 1,113
  • 1
  • 8
  • 14
  • Difference by what means? end result will be the same. This is a matter of responsibility. For example if you display the user's name and then he logs out: do you refresh the entire page causing a new render or do you want the change to happen without a page refresh (angular)? – Muli Yulzary Jun 20 '16 at 19:34
  • That's a good point and it pretty much answers my question. Being the end result the same, Angular has the possibility to update the view without a page refresh. Now, I'm not sure whether the other option could have any advantage. – Funkatic Jun 20 '16 at 22:09
  • It does when you want the server to decide what the client can see. (Pages requiring authentication?) – Muli Yulzary Jun 20 '16 at 22:51
  • That makes sense. Thank you. – Funkatic Jun 21 '16 at 13:41

0 Answers0