2

I'm following this Angular 2 official tutorial. When I run npm install I get a folder called node_modules with 12.523 items and 66 MB . Which files are Angular? I'm completely new to this. I need only the Angular js files and core dependencies, where can I find them?

2 Answers 2

3

npm is used to download dependencies to your project. It downloads the sources, but you need to add a reference to them in your HTML. In that tutorial, you can see how to achieve this a little later:

...
<script src="node_modules/core-js/client/shim.min.js"></script>

<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>

<script src="node_modules/rxjs/bundles/Rx.umd.js"></script>
<script src="node_modules/@angular/core/bundles/core.umd.js"></script>
<script src="node_modules/@angular/common/bundles/common.umd.js"></script>
<script src="node_modules/@angular/compiler/bundles/compiler.umd.js"></script>
<script src="node_modules/@angular/platform-browser/bundles/platform-browser.umd.js">
...

Follow the tutorial carefully :)

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

Comments

1

Use source files as usual Build sources into one file and load them from html file

3 Comments

Which ones are Anglular source files?
@alejoss use links on sources in above answer, all of them are inside node_modules folder
Ok thnks, I thought those where the sources plus some extra unnesessary files.

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.