Added client side code for reloading state
parent
371069dca8
commit
503adad637
|
@ -74,6 +74,18 @@
|
||||||
<!-- angular templates will be automatically converted in js and inserted here -->
|
<!-- angular templates will be automatically converted in js and inserted here -->
|
||||||
<!-- endinject -->
|
<!-- endinject -->
|
||||||
<!-- endbuild -->
|
<!-- 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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue