I am using Angular Full stack that uses Angular 2 and I just starting to learn it. It seems like the structures of pure Angular 2 vs the Full stack is quite different, so I am having some troubles following other guides such as Angular2 & TypeScript importing of node_modules
My question is: How do I use a node-module for my client side, that I have installed?
Here is what I have tried so far:
The external library I would like to use is https://www.npmjs.com/package/angular-star-rating (even though I've tried others)
I do "npm install angular-star-rating"
Here is where I am stuck. I've tried multiple things such as importing it in the component.ts I want to use it in, loading the scripts in the html, and loading the module in my app.ts. I don't see system.config (from system.js, though I believe it is used), nor any place with @NgModule where I can load in the module, so I thought the best suitable places was app.ts. I would get errors when I do "gulp serve", errors such as
ERROR in ./~/angular-star-rating/src/star-rating.component.ts Module parse failed: [directory] Unexpected character '@' (14:0) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected character '@' (14:0)
Here is a quick look at my project structure: https://i.stack.imgur.com/WZT4m.jpg
Thanks, any help is appreciated greatly