Skip to content

Commit

Permalink
v4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Oct 14, 2017
1 parent 1b68186 commit 132f55d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.0.2

- fix(switching button type) remove old button class

## 4.0.1

- fix wrong rollup config for **HttpClientModule**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-sharebuttons",
"description": "Share buttons components for Angular 4.3+",
"version": "4.0.1",
"version": "4.0.2",
"filename": "./src/ngx-sharebuttons.js",
"homepage": "http://github.com/MurhafSousli/ngx-sharebuttons",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/share-buttons/share-buttons.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class ShareButtonsComponent implements OnInit, OnDestroy {
}

/** Buttons theme */
theme = this.share.theme;
theme;

@Input('theme')
set setTheme(theme: string) {
Expand Down
11 changes: 7 additions & 4 deletions src/directives/share-button.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export class ShareButtonDirective {
/** Add new button class e.g.: sb-facebook, sb-twitter ...etc */
this.renderer.addClass(this.el, 'sb-' + button.prop.type);

/** Keep a copy of current class */
this.buttonClass = button.prop.type;

/** Get link's shared count */
this.getCount();
} else {
Expand Down Expand Up @@ -88,10 +91,10 @@ export class ShareButtonDirective {
@Output() sbClosed = new EventEmitter<string>();

constructor(private share: ShareButtonsService,
public renderer: Renderer2,
public cd: ChangeDetectorRef,
el: ElementRef,
universal: UniversalSupportService) {
public renderer: Renderer2,
public cd: ChangeDetectorRef,
el: ElementRef,
universal: UniversalSupportService) {
this.el = el.nativeElement;
this.window = universal.nativeWindow;
}
Expand Down

0 comments on commit 132f55d

Please sign in to comment.