Created
March 25, 2016 17:34
-
-
Save dmachat/6ccc380f7e6fb72a46d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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