Am trying to implement danialfarid's angularjs-file-upload using meanjs. But it's not working.
Is it possible to use it with meanjs??
Am trying to implement danialfarid's angularjs-file-upload using meanjs. But it's not working.
Is it possible to use it with meanjs??
You should be able to use it, it looks like you miss a step in including the angularjs-file-upload module into your project, so here's the steps for including this module or any external angular module in MeanJS Application:
1- after installing angularjs-file-upload file upload via bower with the command:
2- you should add reference the angularjs-file-upload.js files in your application layout page, this is done in the file: config\env\all.js, you should have the lines like this:
3- then you should include angularjs-file-upload as a dependency in your angular application, this is done in the file: public\config.js, add 'angularFileUpload' at the end of the array in this line:
4- you should be able to use the file uploader in your view now, if not complete also the next step then try again.
5- if you want to use the angularjs-file-upload service in you controller, you should inject the upload service ($upload) in your module registeration like this:
6- now you should be apple to use the $upload service from angularjs-file-upload in your angular controller like this:
That will be all from client side, not that you have to configure your server side app or route(s) to be able to handle requests with file uploads, using a library like Multer will do the trick.