[英]html5, angularJS with closure compiler and/or closure library
I'm considering html5, angularJS for data binding and also google closure compiler and the closure library for interactive web applications. 我正在考虑用于数据绑定的html5,angularJS以及用于交互式Web应用程序的谷歌闭包编译器和闭包库。 Do those work nicely together?
那些一起工作得很好吗? Unfortunately there seem to be no detailed reports up to now.
不幸的是,到目前为止似乎没有详细的报告。
I have adobe flex experience, but I'm fairly new to pure js. 我有adobe flex经验,但我对纯粹的js相当新。 So the questions can be considered to be from a beginner's perspective.
所以问题可以从初学者的角度来考虑。 There is no codebase that needs to be ported, everything will be developed from scratch.
没有代码库需要移植,一切都将从头开发。
Some more or less relevant links I already found: 我已经找到一些或多或少的相关链接:
Closure Compiler 关闭编译器
You can definitely compile your code (Angular itself is compiled with Closure compiler), although you can only use simple optimizations at this point. 您绝对可以编译代码(Angular本身是使用Closure编译器编译的),尽管此时您只能使用简单的优化。
In general we want Angular to play well together with the compiler. 一般来说,我们希望Angular与编译器一起很好地发挥作用。
Closure library 关闭库
There is a bunch of project inside Google, using the library together with Angular. Google内部有一大堆项目,将这个库与Angular一起使用。
They use goog.provide() and goog.require() for dependencies. 他们使用goog.provide()和goog.require()来获取依赖关系。 Also using the utilities like goog.isString() or goog.inherits() is absolutely straightforward.
使用goog.isString()或goog.inherits()等实用程序也非常简单。
Using closure UI components might require some extra work (although, again, there are projects using it). 使用闭包UI组件可能需要一些额外的工作(尽管有些项目使用它)。
Hope this help 希望这有帮助
Change code 改变代码
function MyCtrl($scope) {/* code */}
To 至
var MyCtrl = ['$scope', function($scope) {/* code */}]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.