Catalysts / cat-boot

CAT-Boot: A set of libraries on top of the famous and fabolous Spring Boot
Apache License 2.0
23 stars 16 forks source link

cat-boot-enum error on first page load #14

Open JoelColledge opened 8 years ago

JoelColledge commented 8 years ago

The first time that I load an Angular page with a cb-enum select control, it is not populated and I see an error in the developer console. The error is not seen when I subsequently reload the page, perhaps due to caching.

This can be reproduced with https://github.com/Catalysts/cat-boot-sample (master), loading http://localhost:8080/angular#/dynamic-page-1. Adding a loading screen does not fix the issue (see branch feature/jc/loading-screen).

The error is shown below:

angular.js:13294Error: Not yet initialized!
    at CatBootEnumService.list (http://localhost:8080/webjars/cat-boot-i18n-angular/0.0.10/cat-boot-enum/cat-boot-enum-service.js:35:23)
    at link (http://localhost:8080/webjars/cat-boot-i18n-angular/0.0.10/cat-boot-enum/cat-boot-enum-directive.js:28:48)
    at ma (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:79:117)
    at n (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:64:405)
    at g (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:57:378)
    at n (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:64:349)
    at g (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:57:378)
    at g (http://localhost:8080/webjars/angular/1.5.2/angular.min.js:57:395)
    at http://localhost:8080/webjars/angular/1.5.2/angular.min.js:57:17
    at A.link (http://localhost:8080/webjars/angular-route/1.5.0/angular-route.min.js:7:442)