Update index.html
parent
096b172446
commit
bb01385d1b
|
@ -74,18 +74,29 @@
|
||||||
<!-- 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>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
___browserSync___.socket.on('browser:notify', function (data) {
|
___browserSync___.socket.on('browser:notify', function (data) {
|
||||||
if (data.message == 'reload:ng:views') {
|
if ("reload" in data.message) {
|
||||||
angular.element('main.ng-scope').injector().get('$templateCache').removeAll();
|
angular
|
||||||
angular.element('main.ng-scope').injector().get('$state').reload();
|
.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>
|
</script>
|
||||||
<!--</Deject>-->
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue