This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export module ItemsConsts { | |
export const INIT_ITEM_TIMER = 'INIT_ITEM_TIMER'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'maxLength' | |
}) | |
export class MaxLengthPipe implements PipeTransform { | |
transform(value: string, limit: number){ | |
if (value.length > limit) return value.substring(0, limit) + '...'; | |
else return value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'getInitials' | |
}) | |
export class GetInitialsPipe implements PipeTransform { | |
transform(value: string) { | |
return value.replace(/[a-z]/g, '').replace(' ', ''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'mapFromKeyValue' | |
}) | |
export class MapFromKeyValuePipe implements PipeTransform { | |
transform(objArr) { | |
console.log('obj array looks like this: ', objArr); | |
let mappingObject = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'mapToKeyValue' | |
}) | |
export class MapToKeyValuePipe implements PipeTransform { | |
transform(obj: Object) { | |
let modifiedArray = []; | |
for (let key in obj) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, ElementRef, Input, Renderer} from '@angular/core'; | |
import 'jquery-mousewheel'; | |
import 'malihu-custom-scrollbar-plugin'; | |
@Directive({ | |
selector: "[app-scrollbar]" | |
}) | |
export class ScrollbarDirective { |
NewerOlder