Skip to content

Instantly share code, notes, and snippets.

@dmachat
Created March 25, 2016 17:34
Show Gist options
  • Save dmachat/6ccc380f7e6fb72a46d2 to your computer and use it in GitHub Desktop.
Save dmachat/6ccc380f7e6fb72a46d2 to your computer and use it in GitHub Desktop.
const template = `
<ul>
<li ng-repeat=”item in controller.state”>
{{ item.label }} - {{ item.value }}
</li>
</ul>`;
export default function renderController($scope, $ngRedux) {
const disconnect = $ngRedux.connect((state) => {
return {
state: state.data,
};
})(this);
// trigger unsubscribe
$scope.$on('$destroy', disconnect);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment