Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit, Input } from '@angular/core';
- import { stringify } from 'querystring';
- import { ɵngClassDirectiveDef__POST_R3__ } from '@angular/common';
- @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 {
- switch(this.ValueClass === "val" || this.ValueClass === "rec" || this.ValueClass === "env"){
- case this.ValueClass === "val":{
- this.ValidClass = "val-span"
- console.log("verde");
- break;
- }
- case this.ValueClass === "rec":{
- this.ValidClass = "rec-span"
- console.log("rojo");
- break;
- }
- case this.ValueClass === "env":{
- this.ValidClass = "env-span"
- console.log("gris");
- break;
- }
- default:{
- break;
- }
- }
- //console.log("entra");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement