Angular.js和Angular.dart之间的差异? [英] Differences between Angular.js and Angular.dart?

查看:947
本文介绍了Angular.js和Angular.dart之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道一点Angular.js,但我想教自己飞镖和Angular.dart现在。我有点好奇,两者之间的差异,虽然。该Angular.dart教程明确表示不会比较两个。请问谁使用两个人有分歧是什么看法?

I know a bit about Angular.js, but I want to teach myself Dart and Angular.dart now. I'm a bit curious what the differences between the two are, though. The Angular.dart tutorial specifically says it won't compare the two. Does anyone who has used both have a perspective on what the differences are?

推荐答案

AngularDart和AngularJS都是由角团队维护。我们已经采取了很多从侧面JS知识,并应用它来飞镖。我们也采取了很多code,并把它移植直达特世界。

AngularDart and AngularJS are both maintained by the Angular team. We've taken a lot of knowledge from the JS side and applied it to Dart. We have also taken a lot of code and ported it straight to the Dart world.

在技术层面上,在角的核心是:

At a technical level, in the core of Angular:


  • 这位前pression语言是两个版本之间的兼容。该AngularDart解析器开始从JS直口,但一直在不断完善自身。一个很大的区别有该飞镖解析器支持多个后端,包括飞镖code发生器。

  • The expression language is compatible between the two versions. The AngularDart parser started as a straight port from JS but has been evolving on its own. A big difference there is that the Dart parser supports multiple backends, including a Dart code generator.

的DI系统是不同的。在DART那里的Javascript是基于象征它是基于类。

The DI system is different. In Dart it is class based where in Javascript it is symbol based.

编译器已经在飞镖版本被完全重写。这意味着,指令的行为不同,现在有是修改DOM,装饰指令和组件结构指令之间的区别。

The compiler has been completely rewritten in the Dart version. This means that directives behave differently and now there is a distinction between "structural directives" which modify the DOM, "decorative directives" and components.

NG-transclude已经融化到浏览器,由标准的影子DOM更换。

ng-transclude has "melted into the browser", replaced by the standard shadow DOM.

指令控制器已被合并到组件

directive controllers have been merged into components

指令声明与注解的类。链接/编译功能替换为应用函数

directives in AngularDart are declared with an annotated class. link / compile functions are replaced with an apply function

在AngularDart,范围会自动通过达特区消化,消除从范围的需要。$适用。

In AngularDart, the scope is digested automatically through Dart zones, eliminated the need from scope.$apply.

AngularDart,却有着不使它回到AngularJS没有属性映射的概念。这意味着,指令应该需要少得多的范围。$手表,甚至在示波器的依赖。

AngularDart has a concept of attribute maps which hasn't made it back to AngularJS yet. This means that directives should need many fewer scope.$watches or even a dependency on the Scope.

有可能是其他方面的差异,但这是一个很好的列表,让你开始。

There may be other differences, but that is a good list to get you started.

这篇关于Angular.js和Angular.dart之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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