import { * } from "@angular"而不是“angular2" [英] import { * } from "@angular" instead of "angular2"

查看:35
本文介绍了import { * } from "@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 angular2directory exists. So logically it should be

import { Component } from "angular2/core" 

这两个有什么区别?

推荐答案

这是从 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

这篇关于import { * } from "@angular"而不是“angular2"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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