Is AngularJS just for single-page applications (SPAs)?

后端 未结 5 1229
轮回少年
轮回少年 2020-11-29 15:21

We are looking at options to build the front end of an application we are creating and are trying to evaluate a tool that will work for us and give us the best platform to m

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 15:48

    Maybe my experience will be useful to someone. We split our project logically. One SPA we use for feed, another one to work with the map, another one for editing a user profile and etc. For example we have three apps: feed, user and map. I use it in the separated urls, like this:

    https://host/feed/#/top/
    https://host/user/#/edit/1/
    https://host/map/favorites/#/add/
    

    Each of these applications has it's own local routing mappings between states in the application. I think it is a good practice because each application work only with its own context and load dependencies that it really need. Also, it's practice very good for debug and integration processes.

    Indeed, you can very easily make a mix of SPA apps, for example the feed will be url with the angularjs application, the user app with the reactjs and map to the backbone.js application.

    In response to your question:

    Angular not just for SPAs, Angular play good and fast for SPA applications, but no one bothers to build MPA application of a variety of SPA applications. But thinking about your url architecture don`t forget about SEO availability of your applications.

    I also support the idea:

    What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular website. A project can contain multiple apps. An app can be in multiple projects.

提交回复
热议问题