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
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 :)
Comments
Use source files as usual Build sources into one file and load them from html file
3 Comments
Alejandro Veintimilla
Which ones are Anglular source files?
uamanager
@alejoss use links on sources in above answer, all of them are inside
node_modules folderAlejandro Veintimilla
Ok thnks, I thought those where the sources plus some extra unnesessary files.