Manually trigger pipe update

First way: paremeter One way to make a Pure Pipe becoming impure is add a parameter to your Pipe. when you want to refresh, just change the parameter. Second way: without parameter Pure Pipe will be fired when its input has a new instance. So with TypeScript 2.1+, the below code will copy the original … Read more

Angular 4 Pipe Filter

Here is a working plunkr with a filter and sortBy pipe. https://plnkr.co/edit/vRvnNUULmBpkbLUYk4uw?p=preview As developer033 mentioned in a comment, you are passing in a single value to the filter pipe, when the filter pipe is expecting an array of values. I would tell the pipe to expect a single value instead of an array export class … Read more

How to use pipes in Component

Add to providers array in the component @Component({ selector: ‘app-root’, templateUrl: ‘…’, providers:[DatePipe] }) or inject it to module @NgModule({ providers:[DatePipe] }) or write a separate class extending the DatePipe and use it as a service @Injectable() export class CustomDatePipe extends DatePipe { transform(value, format) { return super.transform(value, format); } } and inject this to … Read more

Tooltip issue, MatTooltip not working in Angular

To use Angular-Material Tooltip you will need: Import the BrowserAnimationsModule and MatTooltipModule: app.module.ts import { BrowserAnimationsModule } from ‘@angular/platform-browser/animations’; import { MatTooltipModule } from ‘@angular/material/tooltip’; @NgModule({ imports: [ BrowserAnimationsModule, MatTooltipModule, // … Add tooltip to your component test.component.html <div matTooltip=”Tooltip!”>Hover me</div> P.S If you haven’t already installed and imported HammerJs you may need to (Material … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)