如何将值从内容传递到angular4中的侧边栏?

时间:2017-07-12 05:32:58

标签: angular4-forms

export class CreateOrderComponent implements OnInit 
{
    myorder = new Order(0,0,0);
    onSubmit(value){  
        console.log('you submitted value:',value); 
        this.pickup(); 
    }
    constructor(private router: Router) { }
    pickup() {
        this.router.navigate(['/pickupLocation']); 
    }
    shipper() {
        this.router.navigate(['/shipper']); 
    }
    ngOnInit() { }
}

我正在尝试将对象从我的表单传递到类似页面中的侧栏。我怎么能这样做?