System.js Loading Example #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think it would be helpful for adoption if there was an example of how to use this library with the Sysetm.js module loading that is in the current Angular2 documentation and examples.
This module loading business is new to many (including my self) and the config seems very specific, brittle and sparsely documented. So I think It would be helpful to the project and the community if there was an example of how to integrate the file uploader into the quick start project for example which uses the System.js loader in the browser.
I have already added this to https://github.com/valor-software/ng2-bootstrap#quick-start
same will be here too soon
+1. Also, please provide bundled javascript files to include in the HTML. Right now I have no idea how to use this in my app, which javascript files I need to include, etc. Even though I really want to use it, it looks great.
+1
Thanks for the work on these packages!
@mwijnands I managed to incorporate the lib doing the following:
Note the
vendorfolder in themapconfig. I have a script that moves files fromnode_modulesintovendor. You may need to usenode_modules/ng2-file-upload/ng2-file-upload.jsThen in my component:
@electricBonfire if you can create a fork or branch or folder with ng2-file-upload sample from here
https://github.com/valor-software/angular2-quickstart
I will really appreciate it :)
@electricBonfire's approach also works for apps created from the angular CLI, with following notes:
src/system-config.jsangular-cli-build.jsto ensure that the module is copied to vendor/ automatically (just addng2-file-upload/**/*.js(Also ... grunt, gulp, webpack, brunch. Now, SystemJS. Grr.)
@valorkin I am busy for the next week or so, I will try to put something together when things slow down. If no one else beats me to it!
@valorkin: https://github.com/electricBonfire/ng2-file-upload-systemjs-quickstart
I am using ng2-file-upload with https://github.com/mgechev/angular-seed .. and the following worked for me .. if anyone needs it
This is working for me
system.config.jsin
app.module.tsimport { FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload';@piyukore06 I also use ng2-file-upload with https://github.com/mgechev/angular-seed , but I found a cleaner way: