实际使用玉模板angularjs的 [英] Actual use of Jade template and angularjs

查看:156
本文介绍了实际使用玉模板angularjs的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立使用和的NodeJS前preSS网站。如何使在页面中分裂动态?用于翡翠?如果没有怎么办呢?是什么angularjs用的?请帮我搜索的谷歌了很多,我不能让他们中的使用情况的透明度。

I am building a website using nodejs and express. How to make divisions in a page dynamic? Is Jade used for that? if not how to do it?what is angularjs used for? Please help i searched a lot on google and i couldn't get a clarity in the usage of them.

推荐答案

翡翠会在浏览器中使用上的服务器端的HTML 的。浏览器中执行的web服务器的请求时,网络服务器执行玉,这将产生将被发送到浏览器的HTML。这的服务器端内容生成的已经很普遍,在过去约20年,但构建丰富的互联网应用程序时,它有相当一些缺点。晴这与性能和客户端状态跟踪做的。

Jade creates the html used in the browser on the server-side. The browser executes a request to the web-server, the web-server executes Jade, which will generate the html that will be sent to the browser. This server-side content generation has been very common in the last ~20 years, but it has quite some cons when building rich internet application. Mostly this has to do with performance and client state tracking.

AngularJS是一个客户端的 MVC / MVVM 的类似框架来构建所谓的 单页应用 的(SPA),它可以让你有完整的用户界面流,所有的内容生成和状态跟踪在客户端做。它甚至允许你建立离线应用。但从开发商角度这给人的感觉更像构建桌面应用程序在客户端的知道的的用户界面的状态。从视图的用户点,因为用户界面是本地生成的所有网站将响应更加顺畅迅捷和

AngularJS is a client-side MVC/MVVM like framework to build so called Single Page Applications (SPA), which allows you to have the complete user interface flow, all content generation and state tracking to be done at the client side. It even allows you to build offline applications. From the developer point of view this feels much more like building a desktop application where the client knows the state of the user interface. From the user point of the view the website will respond much smoother and snappier because the UI is all generated locally.

请注意:SPA做的的意思是,你只能有一个页面,您的网站。
它是一个技术术语,其中浏览器下载一页(〜/ index.html中),它含有完整的或部分的网络应用程序。用户在技术上永远不会离开这个页面,但内容(页)进出此占位符页面是动态交换。

Note: SPA does not mean that you can only have one page in your website. It's a technical term where the browser downloads one page (~/index.html), which contains the complete or partial web application. The user technically never leaves this page, but the content (pages) is dynamically swapped in and out from this placeholder page.

要最常见的方式来提供数据给的 SPA 的是通过 REST风格的的Web服务。 AngularJS带有内置支持休息。

To most common way to provide data to a SPA is via RESTful web services. AngularJS comes with builtin support for REST.

一些开发商结合了AngularJS服务器端内容生成技术,但实际上没有真正的需要这一点。

Some developers combine server-side content generation techniques with AngularJS, but there's actually no real need for this.

这篇关于实际使用玉模板angularjs的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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