angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

[Question] Angular for both backend & frontend.

Open duynb opened this issue 9 years ago • 3 comments

I'm going to build my website using client/server

  • Server is php (api)
  • Client using angular2 for both backend & frontend

The problem is that they are 2 different design templates with many external js libs.

So should I use one project with 2 modules (backend, frontend), or using 2 projects?

  • If both in one project, I cannot separate the js libs (load external js in module or components), I can just load all of them in the index.html (js for both design template)

  • If I use 2 projects, then the projects cannot use the shared services class (and the service class need to create 2 times in 2 project)

Please give me the suggestion. Thanks.

duynb avatar Dec 14 '16 03:12 duynb

While I cannot personally assist you, I believe this is a question better suited for StackOverflow than angular-cli project since all the questions/issues related should be about it to keep it clean and on the topic.

Nikki1993 avatar Dec 14 '16 08:12 Nikki1993

Yeah this is mostly an architecture question and better for Stack Overflow.

What I did in similar projects was to factor out the common shared bits into a projectname-frontend-core core package that I imported in the projects that needed to share stuff.

filipesilva avatar Dec 30 '16 11:12 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.