我需要学习angular2,关于它的文献不多,所以我决定在官方网站上学习angualr2:https://angular.io/docs/ts/latest/tutorial/。
我安装了来自https://github.com/buckyroberts/angular-2-template的angular2样板。
当我学习这门课的时候,有些事情是不一样的。
1
官方网站上的教程是这样导入角核的:
import {Component} from '@angular/core';
但样板:
import {Component} from 'angular2/core';
官方网站上的教程是基于角度1的吗?不是角质2?
2
在https://angular.io/docs/ts/latest/tutorial/toh-pt1.html#!#two-way-binding的那部分。
正式教程导入angular/form
,并最终实现双向绑定.
但是样板,他们不导入angular/form
,而是可能双向绑定.
不一样吗?
我真的很困惑。
学习angular2的最好方法是什么?我想也有很多版本,有更好的主意吗?
发布于 2016-10-09 22:56:38
https://github.com/buckyroberts/angular-2-template演示了旧版本示例。
您可以在这里引用新版本的内容:https://github.com/angular/quickstart
FYI:新版本
1)
import {Component} from 'angular2/core';
在beta version
,,但后来Angular2通过了RC(release candidate)
和final version
.因此,它被移除并更改为@angular/core
,因为RC
angular/form
,和its现在的@angular/forms
.一样的2)
获得详细信息,请查看以下内容: https://github.com/angular/angular/blob/master/CHANGELOG.md
https://stackoverflow.com/questions/39952703
复制相似问题