angular - How to pass an object from parent component to child component which is created using DCL loadintolocation()? -


i loading component using dcl.i want pass object component.. have made plunker demo http://plnkr.co/edit/qklmnnjfrt8pyvngdjg4?p=preview appcomponent parent , object want pass information = {name:"abhi", place:"banglore"};

export class somecomponent { public childform: controlgroup; constructor(fbs: formbuilder) {   this.childform = fbs.group({     'name':  ['', validators.required],   'place':[''] }); }  } 

this child component...when ever new component loads want display object passed in input box of child component.i have no idea how pass data parent child in dcl...somebody please me guys...

the componentref provides reference created component it's instance getter

loadintolocation(...).then(ref => {   ref.instance.somefield = somevalue; }  

see similar question how call event in parent component child component loaded using dcl loadintolocation()


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -