Import unable to locate angular2 in beta.1

做~自己de王妃 提交于 2019-12-01 01:37:44

Basically it is causing error from you app.ts file where you have your component resides.

For importing Component, View & bootstrap old version has angular2/angular2 path

import {Component, View, bootstrap} from 'angular2/angular2';

Everyone knows day by day angular2 API has changed rapidly.

So as per current version you need to do angular2/core for importing Component, View

& bootstrap should imported from angular2/platform/browser js

import {Component, View} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {NgFor} from 'angular2/common'; //common things are there in common module

Other than that Rx jx component has been moved out from angular2.dev.js, if you have any code related then you need to include Rx.js separately in your app.

Also you need to include angular2-polyfills.js & es6-shim.js js files to enable support for the older application.

Angular2 Changelog.md

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!