-
Notifications
You must be signed in to change notification settings - Fork 12k
Including a 3rd party lib #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found something interesting... If I add a console line in the library I am able to print it on the screen when I do this in my main.ts file:
How can I access this file in my components? |
Have you tried:
and
|
Yes. Same error:
I created a repo if you want it: https://github.com/jdell64/vigilant-goggles/tree/master |
This is really just a typescript issue. Just add the following to src/typings.d.ts
and use
|
@jdell64 I sent your repo a PR with the required changes. |
Thank you so much! It's tough picking all the different things up from 0. I really appreciate On Friday, June 3, 2016, Mike Cebrian [email protected] wrote:
Richard J Tindell Ps 102:18- "This will be written for the generation to come, That a people |
fyi, also works as:
I took the initial example from: https://www.typescriptlang.org/docs/handbook/modules.html |
Thanks @JSMike for answering this issue. It seems to be done so I'll close it. |
This only works after the typings fix, right Mike? On Saturday, June 4, 2016, Mike Cebrian [email protected] wrote:
Richard J Tindell Ps 102:18- "This will be written for the generation to come, That a people |
@jdell64 yes, either way, after you add the typings. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I have looked at a number of different issues (#274, #785, #845) and the wiki page (https://github.com/angular/angular-cli/wiki/3rd-party-libs) and I still cannot get a simple JS file to work in my project.
I'm trying to use filesaver.js in my app. My
angular-cli-build.js
my system-config.ts
I installed the package with npm:
It shows up in my vendor folder:
I try to use it in my component, and it
Cannot find module filesaverjs
:What am I missing?
Useful info:
OS?
Linux Ubuntu
Versions.
Repro steps.
run this:
ng testProj
cd ./testProj
npm install filesaver.js --save
make the changes outlined above to
system-config.js
andangular-cli-build.js
run
ng build
edit
./src/app/test-proj.component.ts
://add this line:
'filesaverjs': {defaultExtension: 'js', main: 'FileSaver'},
ng build
orng build
:The text was updated successfully, but these errors were encountered: