Skip to content

Commit

Permalink
Anchor color updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-dhiman-tas committed Sep 7, 2017
1 parent ceb5eb1 commit ec1a5a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/truncate.module';
1 change: 0 additions & 1 deletion src/index.ts

This file was deleted.

6 changes: 4 additions & 2 deletions src/truncate.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ import {
*ngIf="isShown"
(click)="showLess($event)"
role="button"
href=""
>
{{ showLessText }}
</a>
<a
*ngIf="!isShown"
(click)="showMore($event)"
role="button"
href=""
>
{{ showMoreText }}
</a>
Expand All @@ -48,20 +50,20 @@ export class TruncateComponent implements OnInit, OnChanges {
}
}
ngOnChanges(changes: SimpleChanges) {
console.log(this.showLessText)
if(changes.hasOwnProperty('showLessText')) {
this.showLessText = changes.showLessText.currentValue;
}

if(changes.hasOwnProperty('showMoreText')) {
this.showMoreText = changes.showMoreText.currentValue;
}
}
showMore(e) {
e.preventDefault();
this.isShown = true;
this.onChange.emit(true)
}
showLess(e) {
e.preventDefault();
this.isShown = false;
this.onChange.emit(false)
}
Expand Down
2 changes: 1 addition & 1 deletion src/truncate.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
name: 'truncatehtml',
name: 'truncate',
pure: false
})
export class TruncatePipe implements PipeTransform {
Expand Down

0 comments on commit ec1a5a4

Please sign in to comment.