In angular we can make our html to have seperate sections of components which is pretty neat.
BUT. Sometimes I cant get changeDetection to work.
e.g host html page
<section>
<app-component-section1></app-component-section1>
</section>
<section>
<app-component-section2></app-component-section2>
</section>
app-component-section1 html
<span>{{getTotalValue}}</span> THIS IS NOT UPDATING when value below is changed.
app-component-section1 typescript
getTotalValue: string;
service call to get api data from sql server etc
GetTotalValue(){
//return api data
console.log(response.toString());
//this value updates as expected
}
I have tried change detection but it isnt working.