从"@angular"导入{*}而不是"angular2" [英] import { * } from "@angular" instead of "angular2"
本文介绍了从"@angular"导入{*}而不是"angular2"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对angular2有点困惑.许多示例节目都像
I am little confused here in angular2. Many example show like
import { Component } from "@angular/core"
但是实际上在node_module
中存在angular2
目录.所以从逻辑上讲应该是
But actually in node_module
there is angular2
directory exists. So logically it should be
import { Component } from "angular2/core"
这两者之间有什么区别?
What is the difference between this two ?
推荐答案
这是从beta.17到rc.0的更新中引入的更改
That's a change that was introduced with the update from beta.17 to rc.0
https://github. com/angular/angular/blob/master/CHANGELOG.md#200-rc0-2016-05-02
这篇关于从"@angular"导入{*}而不是"angular2"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文