angularLocalStorage icon indicating copy to clipboard operation
angularLocalStorage copied to clipboard

Using with app's that are coded using controller as syntax

Open chrissearle opened this issue 11 years ago • 0 comments

I was looking to update an existing app to use local storage.

This app is written consistently with "Controller as namespace" in the views and no use of $scope in the controllers themselves.

So - e.g. given that a controller exposes

this.dataObject = {}

Is there a good approach to binding that two-way into localstorage without having to re-write everything back to $scope injection on the controller?

chrissearle avatar Nov 12 '14 09:11 chrissearle