仅仅是单页的应用程序(水疗)AngularJS? [英] Is AngularJS just for single-page applications (SPAs)?

查看:143
本文介绍了仅仅是单页的应用程序(水疗)AngularJS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在考虑的选项来构建我们正在创建一个应用程序的前端,并试图评估工具,它会为我们的工作,给我们的最佳平台向前发展。

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 move forward.

这是一个 Node.js的项目。我们最初的计划是使用防爆preSS和走这路线,但我们决定揭开序幕这个阶段之前,它可能是最好的复习一下就在那里。我们的应用有几个方面,我们不认为适合单页模型,他们是从应用的角度有关,但不能从视图中的一个。

This is a Node.js project. Our initial plan was to use Express and go down that route, but we decided that before we kick off this stage it might be best to review what is out there. Our application has several areas which we don't believe fit the single-page model in that they are related from an application perspective, but not from a view one.

我们已经看到了一些我们可以用它来打造出来的客户端如 Backbone.js的的框架, 流星等也AngularJS。

We have seen a few of the frameworks we could use to build out the client like Backbone.js, Meteor, etc. and also AngularJS.

这可能是一个很明显的问题,但我们似乎无法破译如果AngularJS纯粹是单页的应用程序,也可以用于多页的应用程序,如前preSS的实例。

This may be a fairly obvious question, but we cannot seem to decipher if AngularJS is purely for single-page application or it can be used for multi-page applications like Express for instance.

更新2013年7月17日
只是为了保持在循环的人,因为我们要经历的过程,我会更新这个问题。我们要现在建立起来的一切,我们将看到如何执行。我们已经接触了几个人谁与AngularJS比我们更有资格,也提出了对分裂共享方面较大的应用程序的问题,但可能会在一个页面上过大的工作。

UPDATE 17 July 2013 Just to keep people in the loop, I will be updating this question as we go through the process. We are going to build everything together for now, and we will see how well that performs. We have reached out to a few people who are more qualified with AngularJS than us and posed the question regarding splitting up larger applications that share context, but may be too large working on a single page.

的共识是,我们可以服务于多个静态页面,并创建只有那些网页的工作,有效地创建SPA的收集和使用标准链接这些应用程序连接起来AngularJS应用。现在,我们的用例是非常具体的为我们的解决方案有几个应用程序,并且正如我所说,我们要首先尝试单code基地,并从那里进行优化。

The consensus was that we could serve multiple static pages and create AngularJS applications that work with only those pages, effectively creating a collection of SPA and linking those applications together using standard linking. Now our use case is very specific as our solution has several applications, and as I said we are going to try the single code base first and optimise from there.

推荐答案

不是。您可以使用角度来构建各种应用程序。客户端路由仅仅是一小片了。

Not at all. You can use Angular to build a variety of apps. Client-side routing is just a small piece of that.

您有特点的大名单,这将有利于你的客户端路由之外:

You have a large list of features that will benefit you outside of client-side routing:


  • 双向绑定

  • 模板

  • 货币格式

  • 多元化

  • 可重用的控件

  • 的RESTful API处理

  • AJAX处理

  • 模块化

  • 依赖注入

这是疯狂到认为所有认为只能在单页的应用程序使用。当然不是..这就像说jQuery是仅用于动画项目。

It's crazy to think that all of that "could only be used in a single page app". Of course not.. that's like saying "Jquery is only for projects with animations".

如果它适合你的项目,使用它。

If it fits your project, use it.

这篇关于仅仅是单页的应用程序(水疗)AngularJS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆