0

I am working on a basic Angular2 sample using NodeJS , and the editor i am using is atom.

I have npm installed angular2(2.0.0-beta.17) and typescript

npm install angular2
npm install -g typescript

In my main.ts am importing

import { Component } from '@angular/core';

For the above line editor is displaying "Can not find module '@angular/core".

What is that I am missing.

2 Answers 2

3

Angular2 no longer uses the package angular2, but rather a list of different packages under the tag @angular. This list includes, but is not limited to:

  • @angular/common
  • @angular/core
  • @angular/compiler
  • @angular/forms
  • @angular/platform-browser
  • @angular/platform-browser-dynamic

Please refer to the 5 Min Quickstart Guide for further details.

Angular2 used the angular2 package up until the release candidate, when it introduced a breaking change by moving the different modules to their own packages, and all of these under the new @angular tag.

Sign up to request clarification or add additional context in comments.

Comments

-1

Package name for angular core is @angular/core.

Read quick start guide regarding all the packages needed for angular 2.

Hope this helps!!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.