javascript - What't the best structure for two AngularJS app? -


i working on blog-style app on anguarjs. has 2 parts. 1 part admin pages editing post, other part view page showing post normal user (maybe apply page theme).

now have finished amdin pages used edit post. facing design structure problem when planning post view page.

my appcontroller in index page admin pages, page layout designed admin page. navigation bar , menus should not available normal user (if not logged in editor).

i can put them , show/hide admin part layout checking login cookie or something. javascript files admin pages not needed "view" post.

should separate them 2 app? or should put them use static page navigate them different configuration?

what's best design structure in case?

p.s. using angularjs , files static file now. involve express if necessary.

update: reason want separate them 2 parts post viewed on mobile phone in of case. save data traffic user if admin code won't loaded in post view page.

honestly doesn't matter, , makes little difference.

if use router, can design view yoursite/admin/ different yoursite/post/:id. alternatively, split site 2 different modules , create 2 different 'apps'.

the main difference, , 1 noticeable user, there page load when switching admin viewer , vice versa if take two-app approach.

my preference (and approach consider 'angular way') use router change view make experience smoother.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -