windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server https://softhier.com/ instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

Ember js : load multiple template on one page with data

Asked By: Anonymous

I am working on a application in ember.js . I have an few questions to all of you guys. First lets discuss about my application points and then what problem I am facing in.

  1. Application is about something like a drawing a plans like a “auto cad “. For this purpose I am using d3.js library
  2. For a drawing purpose we have different sections like Fire, Water, etc..Satelite All of this sections have different svg container for drawing.
  3. After this things I have one module for email this sections to a particular email id in three ways

    3.1 Current Section wise email (Means if we drawing in a fire section then If we send email then svg of fire section will send as a form of pdf) (Done)

    3.2 At a time all the sections svg content in PDF. (Here my actual problem starts)

In this point all sections email I am getting problem in retrieve all section svg’s at a time. Because the current section is already loaded in a view, template with data , But how can I get all the sections template with its drawing data (svg element’s).

I created my route like this

emailPDF = Ember.Route.extend({

    setupController: function(controller, model)
    {
        alert("Controller setup");
        this.controllerFor('fire').set('model', model);
        this.controllerFor('gas').set('model', model);
    },
    renderTemplate: function() {
        this._super();
        this.render('fire', {           // the template to render
            into: 'emailPDF',       // the template to render into
            outlet: 'fire',              // the name of the outlet in that template
            controller: 'fire'        // the controller to use for the template
        });
        this.render('gas', {
            into: 'emailPDF',
            outlet: 'gas',
            controller: 'gas'
        });
    }
});

And the template is like :

<div id="fire_test">
    {{outlet 'fire'}}
</div>
<div id="gas_test">
    {{outlet 'gas'}}
</div>

Then I transition this route from one controller like this :

this.transitionToRoute('emailPDF');

But here in the allSections template I am getting previous template that I have already open in the place of fire and gas outlet not able to render fire and gas template.

Please tell me if i am doing something wrong…


Solution

Answered By: Anonymous

I believe what you want to do here is something like this… You need to create a route, say HomeAndContact. In this route create a template. You have 2 options here, make the template something like:

{{outlet 'home'}}
{{outlet 'contact'}}

Or you could also just do:

{{render 'home'}}
{{render 'contact'}}

I would advise against the second option because it will be deprecated/is not aligned with what Ember is doing going forward.

To do the first option, you will need to have some code like this in your HomeAndContactRoute:

HomeAndContactRoute = Ember.Route.extend({
  setupController: function(controller, model) {
    this.controllerFor('home').set('model', model);
    this.controllerFor('contact').set('model', model);
  },
  renderTemplate: function() {
    this.render('home', {           // the template to render
      into: 'homeAndContact',       // the template to render into
      outlet: 'home',              // the name of the outlet in that template
      controller: 'home'        // the controller to use for the template
    });
    this.render('contact', {
      into: 'homeAndContact',
      outlet: 'contact',
      controller: 'contact'
    });
  }
});

I hope this helps.

techinplanet staff


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno
Alanya escort Manavgat escort Fethiye escort Kemer escort Didim escort http://www.kadinescort.net Gaziantep escort Denizli escort Adana escort Hatay escort Aydın escort İzmir escort Ankara escort Antalya escort Bursa escort İstanbul escort Kocaeli escort Konya escort Muğla escort Malatya escort Kayseri escort Mersin escort Samsun escort Sinop escort Tekirdağ escort Eskişehir escort Yalova escort Rize escort Amasya escort Balıkesir escort Çanakkale escort Bolu escort Erzincan escort Şırnak escort Van escort Yozgat escort Zonguldak escort Afyon escort Adıyaman escort Bilecik escort Aksaray escort Ağri escort Bitlis escort Siirt escort Çorum escort Burdur escort Diyarbakir escort Edirne escort Düzce escort Erzurum escort Kırklareli escort Giresun escort Kilis escort Kars escort Karabük escort Kırıkkale escort Mardin escort Kırşehir escort Maraş escort Manisa escort Muş escort Kastamonu escort Ordu escort Nevşehir escort Sakarya escort Osmaniye escort Şanliurfa escort Sivas escort Trabzon escort Tokat escort Ardahan escort Bartın escort Karaman escort Batman escort Bayburt escort Bingöl escort Elaziğ escort Gümüşhane escort Hakkari escort Isparta escort Uşak escort Igdır escort