Skip to content

Instantly share code, notes, and snippets.

@yigitfindikli
Last active May 16, 2021 17:18
Show Gist options
  • Save yigitfindikli/10831f28a394c95b14da9f4bbad584d3 to your computer and use it in GitHub Desktop.
Save yigitfindikli/10831f28a394c95b14da9f4bbad584d3 to your computer and use it in GitHub Desktop.
PrimeNG Colors - Component
import { Component } from '@angular/core';
import { MessageService, PrimeNGConfig } from 'primeng/api';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
adress: string;
firstname: string;
lastname: string;
visibleSidebar: boolean;
constructor(private primengConfig: PrimeNGConfig, private messageService: MessageService) {}
ngOnInit() {
this.primengConfig.ripple = true;
}
submit() {
this.messageService.add({
severity: 'info',
summary: 'Welcome!',
detail: this.firstname + ' ' + this.lastname
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment