Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit, Input } from '@angular/core';
- @Component({
- selector: 'app-validador',
- templateUrl: './validador.component.html',
- styleUrls: ['./validador.component.scss']
- })
- export class ValidadorComponent implements OnInit {
- @Input() ValueType:string;
- @Input() ValueClass:string;
- ValidClass:string;
- constructor() { }
- ngOnInit(): void {
- /*conditional if for validation*/
- switch(color){
- case this.ValueType == "val":{
- this.ValidClass = "val-span"
- console.log("span1");
- break;
- }
- case this.ValueType == "rec":{
- this.ValidClass = "rec-span"
- console.log("span1");
- break;
- }
- case this.ValueType == "env":{
- this.ValidClass = "env-span"
- console.log("span1");
- break;
- }
- }
- //console.log("entra");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement