{"id":37911972,"url":"https://github.com/ymyang/ng-filedialog","last_synced_at":"2026-01-16T17:20:25.305Z","repository":{"id":93967235,"uuid":"42906206","full_name":"ymyang/ng-filedialog","owner":"ymyang","description":"angular file dialog for nw","archived":false,"fork":false,"pushed_at":"2017-03-27T03:37:34.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T00:02:55.404Z","etag":null,"topics":["angular","filedialog"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ymyang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-22T02:26:11.000Z","updated_at":"2017-04-07T13:37:23.000Z","dependencies_parsed_at":"2023-03-19T18:19:30.089Z","dependency_job_id":null,"html_url":"https://github.com/ymyang/ng-filedialog","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"2d7158ba83dcc4d059bffab845ac2c3a988d2138"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ymyang/ng-filedialog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyang%2Fng-filedialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyang%2Fng-filedialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyang%2Fng-filedialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyang%2Fng-filedialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymyang","download_url":"https://codeload.github.com/ymyang/ng-filedialog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymyang%2Fng-filedialog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","filedialog"],"created_at":"2026-01-16T17:20:24.677Z","updated_at":"2026-01-16T17:20:25.293Z","avatar_url":"https://github.com/ymyang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-fileDialog\nangular file dialog for nw\n\n## What is it\n\nThis is a simple module for node-webkit applications written with AngularJS. It provides a service \ncalled `fileDialog` which allows you to show the user file dialogs like \"save as\" or \"open file\".\nYou can find more information in the\n[File dialogs](https://github.com/rogerwang/node-webkit/wiki/File-dialogs)\nsection of node-webkit's wiki.\n\nThis module allows you to\n- Call \"Save as\" dialog\n- Call \"Open file\" dialog\n- Call \"Open directory\" dialog\n- Provide filters by file types\n- Allow user to select multiple files\n- Specify a default name for the file\n\n\n## Dependencies\n\n1. [AngularJS](http://angularjs.org/)\n2. [nw](https://github.com/nwjs/nw.js)\n\n\n## Usage\n\n1. Include the script into your HTML document after the AngularJS.\n```hmtl\n\u003cscript src=\"path/to/the/angular.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"path/to/the/ng-fileDialog.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"path/to/the/your-app-code.js\"\u003e\u003c/script\u003e\n```\n\n2. Inject `ng-fileDialog` as dependency into your module.\n```js\nvar app = angular.module('app', ['ng-fileDialog']);\n```\n\n3. Use the provided `fileDialog` service\n```js\napp.controller('SomeCtrl', function($scope, FileDialog) {\n    $scope.saveFile = function() {\n      FileDialog.saveAs(function(filename) {\n        // your code\n      });\n    };\n});\n```\n\n\n## API\n\n#### fileDialog.selectFile(callback, acceptTypes)\n\nOpens the \"open file\" dialog, which allows the user to choose some file.\n\n_**callback**_ - *function* - function, which will be called if the user choose the file and clicks OK\nbutton. Required interface: `function(files)`.\n\n_**acceptTypes**_ - *string/array* - an array of accepted file types. See\n[HTML5 specification](http://www.w3.org/TR/html-markup/input.file.html#input.file.attrs.accept).\n\n\n#### fileDialog.selectFiles(callback, acceptTypes)\n\nOpens the \"open files\" dialog, which allows the user to choose some file.\n\n_**callback**_ - *function* - function, which will be called if the user choose the file and clicks OK\nbutton. Required interface: `function(files)`.\n\n_**acceptTypes**_ - *string/array* - an array of accepted file types. See\n[HTML5 specification](http://www.w3.org/TR/html-markup/input.file.html#input.file.attrs.accept).\n\n\n#### fileDialog.selectDir(callback)\n\nOpens the \"open directory\" dialog, which allows the user to choose some directory.\n\n_**callback**_ - *function* - function, which will be called if the user choose the directory and \nclicks OK button. Required interface: `function(file)`.\n\n\n#### fileDialog.saveAs(callback, defaultFilename, acceptTypes)\n\nOpens the \"save as\" dialog, which allows the user to input a name of the file to be saved.\n\n_**callback**_ - *function* - function, which will be called if the user enters a name of the file to \nsave and clicks OK button. Required interface: `function(file)`.\n\n_**defaultFilename**_ - *string* - a default name of the file. Can be omitted by setting false.\n\n_**acceptTypes**_ - *string/array* - an array of accepted file types. See\n[HTML5 specification](http://www.w3.org/TR/html-markup/input.file.html#input.file.attrs.accept).\n\n\n#### fileDialog.open(options, callback)\n\nOpens dialog.\n\n_**options**_ - *Object* - options.\n\n_*multiple*_ - *boolean * - a flag which the user to select multiple files. Default = false.\n\n_*accept*_ - *string/array* - an array of accepted file types.\n\n_*webkitdirectory*_ - *boolean* - WebKit show a directory select dialog. Default = false.\n\n_*nwdirectory*_ - *boolean* - node-webkit show a directory select dialog. Default = false.\n\n_*nwworkingdir*_ - *string* - default directory.\n\n_*nwsaveas*_ - *boolean/string* - open a 'save as' dialog, which lets user enter the path of a file. It's possible to select a non-existing file.\n\n_**callback**_ - *function* - function, which will be called if the user enters a name of the file to \nsave and clicks OK button. Required interface: `function(file)`.\n\n### Important note\n\nPlease, keep in mind that there is no warranty that the callback function will be called each time\nyou call any of the provided methods. If the user clicks the Cancel button the callback **will not**\nbe called!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymyang%2Fng-filedialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymyang%2Fng-filedialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymyang%2Fng-filedialog/lists"}