问题
Sorry if it's a silly question but i am a noob in angular 1.5.x
I am using es6 class based components with one way data bindings throughout the app(best practices as far as i know).
I have a Container Component. It has a Sidebar Component and a Content Component.
I fetch the menu options (array or object) in Container Component and pass it to Sidebar Component and Content Component using one way data binding as attributes.
I want to update the Container Component whenever i change menu options in Sidebar Component or Content Component and it should be reflected in both the child components.
I don't seem to find a way ( without two way data binding ) to do it in angular 1.5 without using $scope events or Service.
来源:https://stackoverflow.com/questions/41058427/how-to-update-parent-component-data-from-child-component-without-two-way-data-bi