angular check if a variable is a type of type code example Example: angular type of string if(typeof myVariable === 'string'){ //do }