<component-with-router-outlet *ngIf="token"></component-with-router-outlet>
<component-with-router-outlet-for-login *ngIf="!token"></component-with-router-outlet-for-login>document.querySelector('td > div').addEventListener('click', function(event){
 event.stopPropagation();
 //event handler code here
})function Price(price_array) {
    this.price_array = price_array;
}
Price.prototype.query = function(type, color) {
    var self = this;
    var returned_price = null;
    self.price_array.forEach(price, index) {
        if(price.type == type && price.color == color){
            returned_price = price;
            return;
        }
    }
    return returned_price;
}function sendAjaxForm(result_form, ajax_form, url) {
        jQuery.ajax({
            url:     url, //url страницы где обрабатывается отправленная форма
            type:     "POST", //метод отправки
            dataType: "html", //формат данных
            data: {
                 action: myAction,
                 jQuery("#"+ajax_form).serialize()
             },  
            success: function(response) { //Данные отправлены успешно
              result = jQuery.parseJSON(response);
              document.getElementById(result_form).innerHTML =""+result.error;
            },
            error: function(response) { // Данные не отправлены
              document.getElementById(result_form).innerHTML = "Ошибка. Данные не отправленны.";
    
            }
        });
      }add_action('wp_ajax_{action}', 'my_action_callback'); //где {action} - тот самый экшн из data а my_action_callback функция которая должна его обработатьfunction go_visible_icon_start(){
	$('.js_icon_left').hide();
	$('.js_icon_left:first').show();
	
	$('.js_item_left').each(function(){
		var vtype = $(this).attr('data-type');
		$('.js_icon_left_' + vtype).show();
	});
	$('.js_icon_right').hide();
	$('.js_icon_right:first').show();
	
	$('.js_line_tab.active .js_item_right').each(function(){
		var vtype = $(this).attr('data-type');
		$('.js_icon_right_' + vtype).show();
	});	
	
	if($('.js_icon_right.active:visible').length == 0){
		$('.js_item_right').show();
		$('.js_icon_right').removeClass('active');
		$('.js_icon_right:first').addClass('active');
	}
	
}
function go_active_left_col(){
	
	if($('.js_item_left:visible.active').length == 0){
		$('.js_item_left').removeClass('active');
		$('.js_item_left:visible:first').addClass('active');
	} 	
	
	var valid = $('.js_item_left.active').attr('data-id');
	$('.js_line_tab').removeClass('active');
	$('#js_tabnaps_'+valid).addClass('active');
	go_visible_icon_start();
	
}
	go_active_left_col();
 
    $(document).on('click',".js_item_left",function () {
        if(!$(this).hasClass('active')){
		    
			$(".js_item_left").removeClass('active');
			$(this).addClass('active');
			go_active_left_col();
        }
        return false;
    });	
	
    $(document).on('click',".js_icon_left",function () {
        if(!$(this).hasClass('active')){
		    
			var vtype = $(this).attr('data-type');
			$(".js_icon_left").removeClass('active');
			$(this).addClass('active');
	
			if(vtype == 0){
				$('.js_item_left').show();
			} else {
				$('.js_item_left').hide();
				$('.js_item_left_'+vtype).show();
			}
			
			go_active_left_col();
			
        }
        return false;
    });
	
    $(document).on('click',".js_icon_right",function () {
        if(!$(this).hasClass('active')){
		    
			var vtype = $(this).attr('data-type');
			$(".js_icon_right").removeClass('active');
			$(this).addClass('active');
	
			if(vtype == 0){
				$('.js_item_right').show();
			} else {
				$('.js_item_right').hide();
				$('.js_item_right_'+vtype).show();
			}
			
        }
        return false;
    });
	
});