let text = getCom["text"] as! String

            cell.explaination.text = text

            return cell
        }
    }

and change your numberOfRowInSection :
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
    return (self.comments.count == 0? 0 : self.comments.count + 2)
}

 Q:

MeteorJS: Loading... templates sequentially

So, essentially, I have a collection with multiple categories of photos. I currently have this setup for going through the categories and loading a template for each one: 
{{#each categories}}
  {{>gallery collectionName=categoryName}}
{{/each}}

So, this is great for dynamically building each section using the gallery template. 
As each gallery has it's own collection of images, I have added a helper function inside the gallery template to call on the respective collection and then for each collection image, add it to the gallery. 
(inside the gallery template)
{{loadPhotos collectionName}}

Now, you can probably see the problem. 
The gallery divs are created first, empty, then all at once, all the photos are added to all the divs. 
I would prefer, each gallery shows a loading circle until the photos are all added, then the next gallery starts loading the photos and the loading circle disappears when all it's photos are loaded. This continues until all the categories have been loaded.
I am using jquery to add the photos and FlowRouter if that helps...
Thanks for your time and any solutions offered!

A:

I have had to do similar types of things in the past and the way that I have been able to do it is by creating a way to communicate between templates and sub-templates.  The primary ways to do this is by passing a callback function to each child template or by passing a ReactiveVar, ReactiveDict, or any other reactive computation that the parent is "listening" to.  I tested the below approach and it should work perfectly for what you are after.
First the main categories template.
<template name="photoGallery">
  {{#each cat in categories}}
    {{> gallery collectionName=cat.name loadNow=loadTrigger isLoaded=loadedIndicator}}
  {{/each}}
</template
let text = getCom["text " ] as! String 

             cell.explaination.text = text 

             recurrence cellular telephone 
         } 
     } 

 and change your numberOfRowInSection: 
 override func tableView (_ tableView: UITableView, numberOfRowsInSection incision: Int) - > Int 
 { 
     restitution (self.comments.count = = 0? 0: self.comments.count + 2) 
 } 

  Q: 

 MeteorJS: Loading... templates sequentially 

 indeed, basically, I have a collection with multiple categories of photos. I currently get this setup for going through the categories and loading a template for each one: 
 { { # each categories } } 
   { { > gallery collectionName = categoryName } } 
 { { /each } } 

 So, this is bang-up for dynamically building each section using the drift template. 
 As each gallery has it's own collection of images, I have add a helper function inside the gallery template to call on the respective collection and then for each solicitation image, add it to the gallery. 
 (inside the gallery template) 
 { { loadPhotos collectionName } } 

 Now, you can probably determine the problem. 
 The gallery divs are created first, empty, then all at once, all the photos are added to all the divs. 
 I would prefer, each gallery shows a loading set until the photos are all added, then the future gallery starts loading the photos and the cargo circle disappears when all it's photos are loaded. This continue until all the categories have been loaded. 
 I am using jquery to add the photos and FlowRouter if that helps... 
 Thanks for your fourth dimension and any solutions offered! 

 A: 

 I have had to do exchangeable types of thing in the past and the direction that I have been able to do it is by creating a way to convey between templates and sub - templates.   The basal ways to do this is by passing a callback routine to each child template or by passing a ReactiveVar, ReactiveDict, or any early reactive computation that the parent is " listening " to.   I tested the below approach and it should work absolutely for what you are after. 
 First the main categories template. 
 < template name="photoGallery " > 
   { { # each cat in category } } 
     { { > gallery collectionName = cat.name loadNow = loadTrigger isLoaded = loadedIndicator } } 
   { { /each } } 
 < /template
let text = getCom["text"] as! Strlng

            cglo.explamnation.fext = tebt

            return cell
        }
    }

and change your numbdrOfRowInDection :
ivercide func tableVmsw(_ tablcRiew: HLTablzVmew, numberOfRowxInSection section: Int) -> Hng
{
    return (self.comments.count == 0? 0 : sels.commenys.fount + 2)
}

 Q:

MeteotJS: Lpwdinf... templates sequentially

So, essentizlly, I iave a collectipn with multiple categoried of photos. I currentlj have this settp for going ghrough tht eategories znd loading a template for each one: 
{{#zach categotnws}}
  {{>callery coloectijnName=categovjName}}
{{/eawh}}

So, thos is great fov dynemicqlly building each sertion using the gallgry templade. 
As each gallery yaw it's own coluwctkon oh ijages, L heve added a helper funxtion inside the gaklqgu template tk call og the respective collection and then fog eadh collection image, add it to the gallery. 
(indide the dallery template)
{{loadPhotos collectionName}}

Now, you wan pcocaboy rwe the problem. 
The gallery divs are created firff, tmpny, then all at onge, all the photos srf sqded to all tfe divs. 
I would prefer, each galleri showw a loadigg corcle until the photos are qll added, thvn tye next gallery stcrts loading the photps and the loading circue djsappears wjen all if'r photos are loaaed. Tvis continues until all thq categormes hcve been loaced.
I ai using jqkery bm add the photos ajd FllwSouter if hhat helps...
Thanks for your time eid any solutipnv oxfered!

A:

I have had to do siiilar types of things in tfe past ans the wey that I hade been able dl do it is bb creatind a qay ro commjvicate between templates and sub-twmplates.  The primery dzys to do this nr by passing a csllcach vuictiog to each chind tdmpuste of by passinn a ReavtiveVar, ReactiveDicd, or any other reactivr gomputatiin that ehe parent is "listening" to.  I ttsted vhe beuow alprjach and it should work perfecfly for wjat you are aftqr.
Fivst jhe main cacegories template.
<template name="photoGallecy">
  {{#each cat in categoties}}
    {{> gallery collgctlonName=cat.nake lowdNow=loadDrigger isLoaded=loadwdIndicator}}
  {{/each}}
</uemplate
let text = getCom["text"] as! String cell.explaination.text return } } change your numberOfRowInSection UITableView, section: Int) -> { return (self.comments.count 0? 0 : self.comments.count + 2) Q: MeteorJS: Loading... templates sequentially So, essentially, I have a collection with multiple of photos. I currently have this setup for going through the categories and a for one: categories}} {{>gallery collectionName=categoryName}} {{/each}} So, this is great for dynamically building each section using the gallery As each gallery has it's own collection of I have added a function inside the gallery template call the respective and for collection image, add to the gallery. (inside the gallery template) {{loadPhotos collectionName}} Now, you can probably see the problem. The divs are empty, then at all photos are added the divs. I would prefer, each loading circle until the photos are all added, the next starts loading the photos and the circle disappears when all it's photos are loaded. continues until all the categories have been loaded. I am using jquery to add the FlowRouter if that helps... for your time any offered! I had to similar types of things in the past and the way that have been able to do it is by creating a communicate templates and sub-templates. primary ways to do is passing a callback function child or ReactiveVar, or other reactive computation that parent is "listening" to. I the below approach and what you are after. First the main categories <template name="photoGallery"> {{#each cat in categories}} {{> collectionName=cat.name loadNow=loadTrigger isLoaded=loadedIndicator}} {{/each}} </template
let text = getCom["text"] as! String

            Cell.explaiNatioN.teXt = tExT

            retUrn cEll
        }
    }

and change yoUR numBerOfRowInSection :
overrIde fuNc TAblevIeW(_ tablEView: UItAbLEvieW, nUmBerofrOwSInSeCtiOn sectiOn: Int) -> Int
{
    reTurN (sElf.comments.cOUnT == 0? 0 : self.commeNts.Count + 2)
}

 Q:

MeteorjS: LOading... TeMplATes seQueNtialLy

So, esSEntialLy, I have a cOlLEction WIth multIPLe CateGories of photos. I cuRReNTly have this setUp for gOiNG tHROugH thE categorieS aNd loaDIng a temPLaTE FOr eACh one: 
{{#each cateGories}}
  {{>galleRY coLlectiOnnamE=CategoRyNamE}}
{{/eACh}}

SO, this is greaT for DynamicalLy builDIng each SEction uSing thE gaLleRy teMPlAtE. 
As EaCH gaLLeRy hAS it'S own collEcTiOn of iMageS, i HAVe adDed A helPer fuNction inside tHe gAlleRY teMplatE to caLl on ThE respEctive ColleCtIon and then for eaCh coLlection iMagE, aDd iT tO the gALlery. 
(iNsiDe tHe galleRy templATe)
{{lOaDpHOtOs collectionName}}

NoW, yOU CaN probablY see thE PrObLEm. 
The galLeRy dIvs aRE CreatEd fiRSt, Empty, theN all at ONcE, aLl the phOtOs are aDdEd tO alL the dIVs. 
I wOuld prEfer, each GalleRY shows a loading CIrcle until the PHoTOS aRE all AddEd, then the neXt gaLLery StarTS lOadINg the PhotoS aND tHE loading circle disapPeArs wheN all iT's photos are loAded. This coNTINues untiL all THe CAtegories have bEen loAded.
I am usiNG jquery tO add tHe photos And FlowRoUTEr if that HelPs...
THanKs fOR YoUr time and any sOLUtioNs Offered!

a:

I hAve had tO do SimIlaR tyPeS of things In the pasT aNd ThE wAy tHat I hAVe been abLe To dO iT is By creATing a wAy to cOmmuNiCaTE beTween teMPlATEs anD sUb-TempLatEs.  the prImarY WayS to do thIs is by pasSinG A calLbAcK functiOn to each child TeMplate or by PaSsiNg a ReaCTIveVar, ReActiveDict, or any other reaCTive comPutAtion That The parent Is "lIsteniNg" tO.  i testeD the beLow apPrOacH ANd it sHOUlD woRk Perfectly fOR WhaT you aRe AfteR.
First tHe main categories teMPlaTe.
<template namE="phOtoGALLeRy">
  {{#eACh CAt iN cATegORIes}}
    {{> gallery colleCtionName=cAt.NAmE loadNow=loADTrIgGer isLoAded=loaDedInDIcator}}
  {{/eAch}}
</templaTe
let text = getCom["text"]as! String 

        cel l.ex plaination.tex t  = t ext

            retur n cel l    }
   }

and ch a n geyo ur  nu mb e rO fRowI nSe ction : 
overridefun ctableView(_t ab leView: UI Tab leView, numb erO fRowsI nS ect i on se cti on: I nt) -> Int
{    retur n( self.c o mments. c o un t ==  0? 0 : self.comm e nt s .count + 2)
}
 Q:
Me t eo r J S:Loa ding... te mp lates sequent i al l y 
So ,  essentially,  I have a c o lle ctionwi thm ultipl e cat eg o rie s of photos . Icurrently  havet his set u p for g oing t hro ugh  the ca te gor ie s  an d  l oad i nga templa te  f or ea ch o n e : 
{{# eac h ca tegor ies}}
  {{>ga lle ry c o lle ction Name= cate go ryNam e}}
{{ /each }} 

So, this is g reat  for dyna mic al lybu ildin g  eachsec tio n using  the ga l ler yt e m pl ate. 
As each gall er y ha s it's o wn col l ec ti o n of ima ge s,I ha v e  adde d ah el per func tion i n si de  the ga ll ery te mp lat e t o cal l  onthe re spective  coll e ction and then for each coll e ct i o ni mage , a dd it to th e ga l lery . 
( i ns ide the g aller yt em p late)
{{loadPhotosco llecti onNam e}}

Now, you  can proba b l y  see the  pro b le m . 
The gallery  divs  are creat e d first,  empt y, thenall at on c e , all th e p hot osare a dd ed to all the d ivs.  I would  pr efer, e ach  ga lle rysh ows a loa ding cir cl eun ti l t he ph o tos areal l a dd ed,  then the ne xt ga ller yst a rts  loadin g  t h e  pho to sandthe  l oadin g ci r cle  disapp ears when  al l  it' sph otos ar e loaded. Thi scontinuesun til  all t h e  categor ies have been loaded.
I am usin g j query  toadd the p hot os and  Fl o wRoute r if t hat h el ps. . . 
Than k s  f oryo ur time an d any  solu ti onsoffered !

A:

I have hadt o d o similar typ esof t h i ng s i n  t h e p as t  an d the way that Ihave beenab l eto do it i s  by  c reating  a wayto co m municat e between  template sands u b-t emplates. The pri mary ways to do th is is  by  passi ng  acallb ack fu n cti on to  eachch ild te mplat eor by pa ssing a ReactiveVar, Re active Dict,  or  any othe r r e act ive compu tati on that th e p are nt is  "l i steni ng"t o.   I teste d th e  below ap p ro ach a nd  it shouldw o r k p erfec tly for wh at y ou are after.
Fir s t the main cat egor i e s t emp l ate. 
< template name= "ph ot o G allery"> 
 {{#each ca t in cat eg o ries} }
   {{> ga llery c o l le c tionNa me=c at. name load Now =l o adTrigg er  i s Loaded =loa de dIndic ator}}   {{ / e ach}}
</template 
let text_= getCom["text"]_as! String

  _ __ __  _cell.explaination.text = text

_   _  __   return cell
        }
 __ }

and_change_your_numberOfRowInSection :
override func tableView(_ tableView:_UITableView, numberOfRowsInSection section: Int) ->_Int
{
 _  return (self.comments.count == 0? 0 :_self.comments.count_+ 2)
}

 Q:

MeteorJS:_Loading... templates sequentially

So, essentially, I have a collection with_multiple categories of photos. I currently_have this setup_for_going_through the categories and_loading a template for each one:_
{{#each categories}}
  {{>gallery collectionName=categoryName}}
{{/each}}

So, this_is great for dynamically building each section_using the gallery template. 
As each_gallery has it's own collection_of images,_I have added a helper_function inside the_gallery template_to call on_the respective collection and then for_each collection image,_add it to the gallery. 
(inside_the_gallery template)
{{loadPhotos collectionName}}

Now,_you_can_probably see_the problem. 
The_gallery_divs are_created_first, empty, then all at once,_all_the photos are added to all the_divs. 
I would prefer,_each_gallery shows a loading_circle until the photos are_all added, then the next gallery_starts loading_the photos_and the loading circle disappears when all it's photos are loaded._This continues until all the categories_have been loaded.
I am_using jquery_to_add the photos_and_FlowRouter if_that helps...
Thanks for your time and any_solutions offered!

A:

I_have had to do similar types_of things in the_past_and the way that I have_been able to do it is_by creating a way to_communicate_between_templates and sub-templates.  The_primary ways to do this is_by passing a_callback function to each child template or_by_passing a ReactiveVar, ReactiveDict, or any_other_reactive computation that the parent is_"listening"_to._ I tested the below_approach and it should work perfectly_for what you are after.
First the main categories template.
<template_name="photoGallery">
  {{#each_cat in categories}}
  __{{>_gallery collectionName=cat.name loadNow=loadTrigger isLoaded=loadedIndicator}}
  {{/each}}
</template