EventEmitter from Subcomponent not workingHow do JavaScript closures work?How do I remove a property from a JavaScript object?How does JavaScript .prototype work?Get selected text from a drop-down list (select box) using jQueryHow do I remove a particular element from an array in JavaScript?How does data binding work in AngularJS?How do I return the response from an asynchronous call?Angular 2 ngModel in child component updates parent component propertyHow does Two way binding works in Angular 2?Angular trigger EventEmitter whenever object contents is changed

What is a subpixel in Super Mario Bros, and how does it relate to wall clipping?

Compact Mechanical Energy Source

Why colon to denote that a value belongs to a type?

How to capture more stars?

Why did this prime-sequence puzzle not work?

If a person had control of every single cell of their body, would they be able to transform into another creature?

Were pen cap holes designed to prevent death by suffocation if swallowed?

Ticket sales for Queen at the Live Aid

Yandex Programming Contest: Alarms

Can a wire having a 610-670 THz (frequency of blue light) AC frequency supply, generate blue light?

Is there any use case for the bottom type as a function parameter type?

Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?

Is there an evolutionary advantage to having two heads?

Leading and Suffering Numbers

1960s sci-fi novella with a character who is treated as invisible by being ignored

Mother abusing my finances

Why does the UK have more political parties than the US?

Could I be denied entry into Ireland due to medical and police situations during a previous UK visit?

Can a flying character can use Ant Haul to carry another character?

How were these pictures of spacecraft wind tunnel testing taken?

Can a Beholder use rays in melee range?

Why does the 6502 have the BIT instruction?

How to prevent bad sectors?

What does "Marchentalender" on the front of a postcard mean?



EventEmitter from Subcomponent not working


How do JavaScript closures work?How do I remove a property from a JavaScript object?How does JavaScript .prototype work?Get selected text from a drop-down list (select box) using jQueryHow do I remove a particular element from an array in JavaScript?How does data binding work in AngularJS?How do I return the response from an asynchronous call?Angular 2 ngModel in child component updates parent component propertyHow does Two way binding works in Angular 2?Angular trigger EventEmitter whenever object contents is changed






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I want to have a two-way-binding from a parent-component to a sub-component. This already works well in one of my components which looks as follows (I emitted some css-classes and other not relevant parts):



parent habit-show.component.html:



habit.label
<app-habit-edit [(habit)]="habit" ></app-habit-edit>


subcomponent habit-edit.component.html:



<input id="habitName" name="label" [(ngModel)]="habit.label" required/>


subcomponent habit-edit.component.ts:



@Input()
private habit: Habit ;

@Output()
habitChange = new EventEmitter<Habit>();


This works as expected: I can see the habit.label in the parent-component and when I change the value in the input it automatically changes too.
Now this is the part of the component that isn't working:



parent habit-edit.component.html:



 habit.goalActive
<app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


subcomponent checkbox.component.html:



 mappedModel
<input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">


subcomponent checkbox.component.ts:



 @Input()
private mappedModel: boolean;

@Output()
mappedModelChange = new EventEmitter<boolean>();


Now in this case, the value in the parent-component doesn't update and I have no idea why, since I did basically the same. The value in the child-component does update correctly.



One thing worth noting might be, that the child component from the first (working) example is the parent in the second example -> that shouldn't be a problem though, should it?



Also the updating of the parent container works when I add a button whenever I press that button (it still doesn't update from the checkbox value though):



parent habit-edit.component.html:



 habit.goalActive
<app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


subcomponent checkbox.component.html:



 mappedModel
<input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">
<button (click)="test()">Test</button>


subcomponent checkbox.component.ts:



 @Input()
private mappedModel: boolean;

@Output()
mappedModelChange = new EventEmitter<boolean>();

test()
this.mappedModel = !this.mappedModel;
this.mappedModelChange.emit(this.mappedModel);



And if I add the test-function to the input itself, nothing at all happens, whenever I press it (not even the mappedModel in the child component updates then)



<label (click)="test()">mappedModel
<input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">




The problem seems to be that I can't properly bind habit.goalActive with the eventemitter from the subcomponent (maybe because it is the property of an object an not the whole object?)
I'm still confused though, since this is no problem with [(ngModel)] on inputs










share|improve this question






























    2















    I want to have a two-way-binding from a parent-component to a sub-component. This already works well in one of my components which looks as follows (I emitted some css-classes and other not relevant parts):



    parent habit-show.component.html:



    habit.label
    <app-habit-edit [(habit)]="habit" ></app-habit-edit>


    subcomponent habit-edit.component.html:



    <input id="habitName" name="label" [(ngModel)]="habit.label" required/>


    subcomponent habit-edit.component.ts:



    @Input()
    private habit: Habit ;

    @Output()
    habitChange = new EventEmitter<Habit>();


    This works as expected: I can see the habit.label in the parent-component and when I change the value in the input it automatically changes too.
    Now this is the part of the component that isn't working:



    parent habit-edit.component.html:



     habit.goalActive
    <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


    subcomponent checkbox.component.html:



     mappedModel
    <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">


    subcomponent checkbox.component.ts:



     @Input()
    private mappedModel: boolean;

    @Output()
    mappedModelChange = new EventEmitter<boolean>();


    Now in this case, the value in the parent-component doesn't update and I have no idea why, since I did basically the same. The value in the child-component does update correctly.



    One thing worth noting might be, that the child component from the first (working) example is the parent in the second example -> that shouldn't be a problem though, should it?



    Also the updating of the parent container works when I add a button whenever I press that button (it still doesn't update from the checkbox value though):



    parent habit-edit.component.html:



     habit.goalActive
    <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


    subcomponent checkbox.component.html:



     mappedModel
    <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">
    <button (click)="test()">Test</button>


    subcomponent checkbox.component.ts:



     @Input()
    private mappedModel: boolean;

    @Output()
    mappedModelChange = new EventEmitter<boolean>();

    test()
    this.mappedModel = !this.mappedModel;
    this.mappedModelChange.emit(this.mappedModel);



    And if I add the test-function to the input itself, nothing at all happens, whenever I press it (not even the mappedModel in the child component updates then)



    <label (click)="test()">mappedModel
    <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">




    The problem seems to be that I can't properly bind habit.goalActive with the eventemitter from the subcomponent (maybe because it is the property of an object an not the whole object?)
    I'm still confused though, since this is no problem with [(ngModel)] on inputs










    share|improve this question


























      2












      2








      2








      I want to have a two-way-binding from a parent-component to a sub-component. This already works well in one of my components which looks as follows (I emitted some css-classes and other not relevant parts):



      parent habit-show.component.html:



      habit.label
      <app-habit-edit [(habit)]="habit" ></app-habit-edit>


      subcomponent habit-edit.component.html:



      <input id="habitName" name="label" [(ngModel)]="habit.label" required/>


      subcomponent habit-edit.component.ts:



      @Input()
      private habit: Habit ;

      @Output()
      habitChange = new EventEmitter<Habit>();


      This works as expected: I can see the habit.label in the parent-component and when I change the value in the input it automatically changes too.
      Now this is the part of the component that isn't working:



      parent habit-edit.component.html:



       habit.goalActive
      <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


      subcomponent checkbox.component.html:



       mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">


      subcomponent checkbox.component.ts:



       @Input()
      private mappedModel: boolean;

      @Output()
      mappedModelChange = new EventEmitter<boolean>();


      Now in this case, the value in the parent-component doesn't update and I have no idea why, since I did basically the same. The value in the child-component does update correctly.



      One thing worth noting might be, that the child component from the first (working) example is the parent in the second example -> that shouldn't be a problem though, should it?



      Also the updating of the parent container works when I add a button whenever I press that button (it still doesn't update from the checkbox value though):



      parent habit-edit.component.html:



       habit.goalActive
      <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


      subcomponent checkbox.component.html:



       mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">
      <button (click)="test()">Test</button>


      subcomponent checkbox.component.ts:



       @Input()
      private mappedModel: boolean;

      @Output()
      mappedModelChange = new EventEmitter<boolean>();

      test()
      this.mappedModel = !this.mappedModel;
      this.mappedModelChange.emit(this.mappedModel);



      And if I add the test-function to the input itself, nothing at all happens, whenever I press it (not even the mappedModel in the child component updates then)



      <label (click)="test()">mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">




      The problem seems to be that I can't properly bind habit.goalActive with the eventemitter from the subcomponent (maybe because it is the property of an object an not the whole object?)
      I'm still confused though, since this is no problem with [(ngModel)] on inputs










      share|improve this question
















      I want to have a two-way-binding from a parent-component to a sub-component. This already works well in one of my components which looks as follows (I emitted some css-classes and other not relevant parts):



      parent habit-show.component.html:



      habit.label
      <app-habit-edit [(habit)]="habit" ></app-habit-edit>


      subcomponent habit-edit.component.html:



      <input id="habitName" name="label" [(ngModel)]="habit.label" required/>


      subcomponent habit-edit.component.ts:



      @Input()
      private habit: Habit ;

      @Output()
      habitChange = new EventEmitter<Habit>();


      This works as expected: I can see the habit.label in the parent-component and when I change the value in the input it automatically changes too.
      Now this is the part of the component that isn't working:



      parent habit-edit.component.html:



       habit.goalActive
      <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


      subcomponent checkbox.component.html:



       mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">


      subcomponent checkbox.component.ts:



       @Input()
      private mappedModel: boolean;

      @Output()
      mappedModelChange = new EventEmitter<boolean>();


      Now in this case, the value in the parent-component doesn't update and I have no idea why, since I did basically the same. The value in the child-component does update correctly.



      One thing worth noting might be, that the child component from the first (working) example is the parent in the second example -> that shouldn't be a problem though, should it?



      Also the updating of the parent container works when I add a button whenever I press that button (it still doesn't update from the checkbox value though):



      parent habit-edit.component.html:



       habit.goalActive
      <app-checkbox [(mappedModel)]="habit.goalActive" ></app-checkbox>


      subcomponent checkbox.component.html:



       mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">
      <button (click)="test()">Test</button>


      subcomponent checkbox.component.ts:



       @Input()
      private mappedModel: boolean;

      @Output()
      mappedModelChange = new EventEmitter<boolean>();

      test()
      this.mappedModel = !this.mappedModel;
      this.mappedModelChange.emit(this.mappedModel);



      And if I add the test-function to the input itself, nothing at all happens, whenever I press it (not even the mappedModel in the child component updates then)



      <label (click)="test()">mappedModel
      <input name="checkbox-input" [(ngModel)]="mappedModel" type="checkbox">




      The problem seems to be that I can't properly bind habit.goalActive with the eventemitter from the subcomponent (maybe because it is the property of an object an not the whole object?)
      I'm still confused though, since this is no problem with [(ngModel)] on inputs







      javascript angular eventemitter two-way-binding subcomponent






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 18:11







      Juliette

















      asked Mar 24 at 8:13









      JulietteJuliette

      124113




      124113






















          2 Answers
          2






          active

          oldest

          votes


















          0














          in your input in child component add change event and call test fuction and remove the ngModel



          <input name="checkbox-input" [ngModel]="mappedModel" (change)="test()" type="checkbox">





          share|improve this answer

























          • Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

            – Juliette
            Mar 24 at 9:16












          • I have edited the answer you can refer it

            – Thivanka Saranatha
            Mar 24 at 10:50











          • Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

            – Thivanka Saranatha
            Mar 24 at 16:41











          • That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

            – Juliette
            Mar 24 at 17:54











          • no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

            – Thivanka Saranatha
            Mar 24 at 17:59



















          0














          I think you are not using your event.
          It work in the first example because you use the same object in parent and child.



          Can you try this :



          <app-checkbox [(mappedModel)]="habit.goalActive = $event" ></app-checkbox>





          share|improve this answer























          • U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

            – Juliette
            Mar 24 at 8:48











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321854%2feventemitter-from-subcomponent-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          in your input in child component add change event and call test fuction and remove the ngModel



          <input name="checkbox-input" [ngModel]="mappedModel" (change)="test()" type="checkbox">





          share|improve this answer

























          • Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

            – Juliette
            Mar 24 at 9:16












          • I have edited the answer you can refer it

            – Thivanka Saranatha
            Mar 24 at 10:50











          • Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

            – Thivanka Saranatha
            Mar 24 at 16:41











          • That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

            – Juliette
            Mar 24 at 17:54











          • no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

            – Thivanka Saranatha
            Mar 24 at 17:59
















          0














          in your input in child component add change event and call test fuction and remove the ngModel



          <input name="checkbox-input" [ngModel]="mappedModel" (change)="test()" type="checkbox">





          share|improve this answer

























          • Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

            – Juliette
            Mar 24 at 9:16












          • I have edited the answer you can refer it

            – Thivanka Saranatha
            Mar 24 at 10:50











          • Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

            – Thivanka Saranatha
            Mar 24 at 16:41











          • That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

            – Juliette
            Mar 24 at 17:54











          • no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

            – Thivanka Saranatha
            Mar 24 at 17:59














          0












          0








          0







          in your input in child component add change event and call test fuction and remove the ngModel



          <input name="checkbox-input" [ngModel]="mappedModel" (change)="test()" type="checkbox">





          share|improve this answer















          in your input in child component add change event and call test fuction and remove the ngModel



          <input name="checkbox-input" [ngModel]="mappedModel" (change)="test()" type="checkbox">






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 24 at 18:03

























          answered Mar 24 at 8:56









          Thivanka SaranathaThivanka Saranatha

          1627




          1627












          • Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

            – Juliette
            Mar 24 at 9:16












          • I have edited the answer you can refer it

            – Thivanka Saranatha
            Mar 24 at 10:50











          • Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

            – Thivanka Saranatha
            Mar 24 at 16:41











          • That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

            – Juliette
            Mar 24 at 17:54











          • no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

            – Thivanka Saranatha
            Mar 24 at 17:59


















          • Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

            – Juliette
            Mar 24 at 9:16












          • I have edited the answer you can refer it

            – Thivanka Saranatha
            Mar 24 at 10:50











          • Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

            – Thivanka Saranatha
            Mar 24 at 16:41











          • That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

            – Juliette
            Mar 24 at 17:54











          • no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

            – Thivanka Saranatha
            Mar 24 at 17:59

















          Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

          – Juliette
          Mar 24 at 9:16






          Why does it work in the first case though? I used the same syntax there. The way I understood it, [(model)]="example" is just short for [model]="example" (modelChange)="example=$event" -> and I also tried splitting it but that didn't work as well (see my other comment below)

          – Juliette
          Mar 24 at 9:16














          I have edited the answer you can refer it

          – Thivanka Saranatha
          Mar 24 at 10:50





          I have edited the answer you can refer it

          – Thivanka Saranatha
          Mar 24 at 10:50













          Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

          – Thivanka Saranatha
          Mar 24 at 16:41





          Instead of (change)="test()" event. I have edited my answer. Problem is with not all the event and property binding it was with the checkbox input

          – Thivanka Saranatha
          Mar 24 at 16:41













          That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

          – Juliette
          Mar 24 at 17:54





          That doesn't make any sense to me though since the value updates in the child component correctly (I output it there as well)-> so the binding from the input to the model works correctly, the change only isn't passed to the parent. Or do I missunderstand your answer?

          – Juliette
          Mar 24 at 17:54













          no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

          – Thivanka Saranatha
          Mar 24 at 17:59






          no [(ngModel)] to check box is not working properly so use (change) then your problem will be solved

          – Thivanka Saranatha
          Mar 24 at 17:59














          0














          I think you are not using your event.
          It work in the first example because you use the same object in parent and child.



          Can you try this :



          <app-checkbox [(mappedModel)]="habit.goalActive = $event" ></app-checkbox>





          share|improve this answer























          • U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

            – Juliette
            Mar 24 at 8:48















          0














          I think you are not using your event.
          It work in the first example because you use the same object in parent and child.



          Can you try this :



          <app-checkbox [(mappedModel)]="habit.goalActive = $event" ></app-checkbox>





          share|improve this answer























          • U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

            – Juliette
            Mar 24 at 8:48













          0












          0








          0







          I think you are not using your event.
          It work in the first example because you use the same object in parent and child.



          Can you try this :



          <app-checkbox [(mappedModel)]="habit.goalActive = $event" ></app-checkbox>





          share|improve this answer













          I think you are not using your event.
          It work in the first example because you use the same object in parent and child.



          Can you try this :



          <app-checkbox [(mappedModel)]="habit.goalActive = $event" ></app-checkbox>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 8:43









          CyrilCyril

          22416




          22416












          • U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

            – Juliette
            Mar 24 at 8:48

















          • U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

            – Juliette
            Mar 24 at 8:48
















          U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

          – Juliette
          Mar 24 at 8:48





          U probably mean like this? <app-checkbox [mappedModel]="habit.goalActive" (mappedModelChange)="habit.goalActive = $event" ></app-checkbox> -> unfortunately that still only changed the value in the child component

          – Juliette
          Mar 24 at 8:48

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55321854%2feventemitter-from-subcomponent-not-working%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현