# Angular two-way binding with service boolean properties

DevFeed: [Angular two-way binding with service boolean properties](<https://devfeed.tech/articles/learning-angular-gosh-my-two-way-binding-doesn-t-seem-to-work-properly-21228.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2014/11/learning-ng-databinding-doesnt-work/>)

Published: 2014-11-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [Code](<https://devfeed.tech/topics/code.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [code](<https://devfeed.tech/tags/code.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [learning](<https://devfeed.tech/tags/learning.md>)

## AI overview

This tutorial explains why an Angular sidebar toggle fails when a boolean service property is bound directly. The boolean value is copied rather than shared by reference, so the binding does not update as expected. The solution is to bind an object instance shared by the service and the directive.

## Source excerpt

Lorem ipsum dolor sit amet