Skip to content

Commit

Permalink
release: 2.1.1, close #2
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Sep 20, 2018
1 parent 0623992 commit 7eee0f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './src/filesaver.provider';
export * from './src/filesaver.service';
export * from './src/filesaver.directive';
export * from './src/filesaver.module';
4 changes: 1 addition & 3 deletions lib/src/filesaver.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import {
} from '@angular/core';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { saveAs } from 'file-saver';

import { FileSaverService } from './filesaver.provider';
import { FileSaverService } from './filesaver.service';

@Directive({ selector: '[fileSaver]' })
export class FileSaverDirective {
Expand Down
7 changes: 2 additions & 5 deletions lib/src/filesaver.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';

import { FileSaverDirective } from './filesaver.directive';
import { FileSaverService } from './filesaver.provider';

@NgModule({
imports: [HttpClientModule],
exports: [FileSaverDirective],
declarations: [FileSaverDirective],
providers: [FileSaverService]
exports: [FileSaverDirective],
})
export class FileSaverModule {
}
export class FileSaverModule {}
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Injectable, EventEmitter } from '@angular/core';
import { Injectable } from '@angular/core';
import { saveAs } from 'file-saver';

@Injectable()
@Injectable({ providedIn: 'root' })
export class FileSaverService {

constructor() { }

genType(fileName?: string): string {
if (!fileName || fileName.lastIndexOf('.') === -1) return 'text/plain';
const type = fileName.substr(fileName.lastIndexOf('.') + 1);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-filesaver",
"version": "2.1.0",
"version": "2.1.1",
"description": "Simple file save with FileSaver.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit 7eee0f4

Please sign in to comment.