Passing Data From Child Component Into Parent Component
问题 I have problems with my angular, here I have two components: MyApp (ParentComponent) LoginPage (ChildComponent) I have a property UserNow in parts MyApp and I want to set the value of the property UserNow through the components LoginPage . How to do it? I have tried (but did not give any influence) Import {MyApp} from '../../app/app.component'; @Component({ selector: 'page-login', templateUrl: 'login.html' }) export class LoginPage { public app: any; login() { ... this.app = MyApp; this.app