html5, angularJS with closure compiler and/or closure library

。_饼干妹妹 提交于 2019-12-03 05:29:44

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.

In general we want Angular to play well together with the compiler.

Closure library

There is a bunch of project inside Google, using the library together with Angular.

They use goog.provide() and goog.require() for dependencies. Also using the utilities like goog.isString() or goog.inherits() is absolutely straightforward.

Using closure UI components might require some extra work (although, again, there are projects using it).

Hope this help

Change code

function MyCtrl($scope) {/* code */}

To

var MyCtrl = ['$scope', function($scope) {/* code */}]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!