Added client side code for reloading state

pull/107/head
Viktor Verebelyi 2016-07-04 04:39:45 +01:00 committed by GitHub
parent 371069dca8
commit 503adad637
1 changed files with 13 additions and 1 deletions

View File

@ -74,6 +74,18 @@
<!-- angular templates will be automatically converted in js and inserted here -->
<!-- endinject -->
<!-- endbuild -->
<!--<Deject>-->
<script>
window.onload = function () {
___browserSync___.socket.on('browser:notify', function (data) {
if (data.message == 'reload:ng:views') {
angular.element('main.ng-scope').injector().get('$templateCache').removeAll();
angular.element('main.ng-scope').injector().get('$state').reload();
}
});
}
</script>
<!--</Deject>-->
</body>
</html>
</html>