Update index.html

pull/107/head
Viktor Verebelyi 2016-07-04 10:16:43 +01:00 committed by GitHub
parent 096b172446
commit bb01385d1b
1 changed files with 21 additions and 10 deletions

View File

@ -74,18 +74,29 @@
<!-- 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();
}
});
}
window.onload = function () {
___browserSync___.socket.on('browser:notify', function (data) {
if ("reload" in data.message) {
angular
.element('main.ng-scope')
.injector()
.get('$templateCache')
.remove(data.message.reload);
angular
.element('main.ng-scope')
.injector()
.get('$templateCache')
.remove(data.message.reload.substring(1));
angular
.element('main.ng-scope')
.injector()
.get('$state')
.reload();
}
});
}
</script>
<!--</Deject>-->
</body>
</html>