Create a boot stand for the application route

I am trying to create a boot stand for the application route using the newly named substitution parameters added recently, but for some reason I cannot get it to work. Initially, I just created a simple loading.hbs template and it worked automatically, but due to problems with substations on the application route, some of my user interfaces were still visible. I would like to fix it now.

I tried renaming and moving the template to the following places:

 /templates/application_loading.hbs /templates/application-loading.hbs /templates/application/loading.hbs 

No one seems to be working. I don't need any custom routing behavior, so by default the route created should do me unless it is required for this. Documentation for this feature seems rare. I found jsbin for this function , and I have to do it correctly according to it, if there is no problem with ember-cli.

Thanks for any help.

 DEBUG: ------------------------------- DEBUG: Ember : 1.11.1 DEBUG: Ember Data : 1.0.0-beta.16.1 DEBUG: jQuery : 1.11.2 DEBUG: ------------------------------- 
+5
source share
3 answers

Indeed, there must be google before adding the bonus.

Obviously, this feature is broken . There the correction already exists, just need to combine and release.

+1
source

I believe that loading.hbs and error.hbs are download applications and errors. Your application-loading.hbs does not exist for Ember, so it does not work.

As for the additional user interface elements: I believe that the rest of application.hbs will be displayed independently, so the only thing I would like to do is to nest all these elements one level deeper. It sounds like a big test, but actually it is not so bad:

In router.js :

 this.resource('whatever', {path: '/'} function() { // All your existing routes }); 

Then rename application.hbs to whatever.hbs and change application.hbs only to {{outlet}} . This should really change quite a bit in practice, but it will leave all the elements of your user interface from rendering to completing the download.

+1
source

It looks like you should have a BasedResolver module

https://github.com/emberjs/ember.js/blob/06e41ad7ccd28558dd4e651aa070bc06f7757821/packages/ember-application/lib/system/application-instance.js#L153

https://github.com/emberjs/ember.js/blob/b80d66f71d75ad0db9022438ed58a41ac84f45f5/packages/ember-routing/lib/system/router.js#L79

When I look at this value in the ember-cli application, it is undefined. Which seems strange because ember-cli is based on the es6 module.

Then I discovered that this https://github.com/emberjs/ember.js/issues/10756 looks like you can add a load or load route in the BaseResolver module to the registry as a workaround.

and

https://github.com/emberjs/ember.js/pull/10944 should solve the problem in the longer term.

It seems you already found this, it did not appear loaded when I wrote this answer. Sorry for the noise.

0
source

All Articles