> For the complete documentation index, see [llms.txt](https://angularjs-store.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angularjs-store.gitbook.io/docs/tutorials-with-javascript/get-the-current-state.md).

# Get the current state

After creating a store, you can now consume it into your application. To get the current state, you need to use the `copy` method of the store.

{% code title="your-controller.js" %}

```javascript
import { CounterStore } from 'counter-store';

function YourController($scope, counterStore) {
  const counterState = counterStore.copy();
  $scope.count = counterState.count;
}

angular
  .module('App', [])
  .controller('YourController', YourController);
```

{% endcode %}

{% hint style="info" %}
`copy` always returns a new copy of the state. Any direct changes in the state copy will not affect the original state of the store.
{% endhint %}
