Update index.html
parent
096b172446
commit
bb01385d1b
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue