Skip to content

Passing parent view's state to nested (or children) component view. #35

@ohpyupi

Description

@ohpyupi

It must be very stupid question but I wasn't able to find any sound solution to my question on the web. So I am posting it if I can get help from here.

Basically I want to make nested views. I was able to make nested views. However, I have no idea how to pass parent's state to nested view's component.

I tried below but didin't work

<UIView user={this.state.user}/>

Also, I am curious how parent and child (or nested) views acually communicate in ui-router. Do they follow the typical data flow in react.js? For example, usually I make functions and save data to state in container component (parent) and pass to children component. So technically child components emit events and parent do the actual work responding to the emitted events.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions