how to display 2 sets of lists in the same list using ngFor (nativescript)How to initialize all members of an array to the same value?How to convert an Array to a Set in JavaHow to remove the first Item from a list?*ngIf and *ngFor on same element causing errorDoes Nativescript using Angular2 need special a *ngFor?In angular2 & nativescript the *ngFor display array's elements on top of each otherHow to make *ngFor work with an ObservableArray in Nativescript?Dynamic object key to display *ngFor in Nativescript with AngularIs *ngFor stable for lists in Nativescript Angular?How to Nest List Views in NativeScript

Reverse dots and boxes, swastika edition

How to md5 a list of filepaths contained in a file?

definition of "percentile"

Simple interepretation problem regarding Polynomial Hierarchy?

How to tell someone I'd like to become friends without causing them to them think I'm romantically interested in them?

Integer Lists of Noah

What is a solution?

How can I effectively communicate to recruiters that a phone call is not possible?

Mysterious Metal Plate on Basement Ceiling?

Matchmaker, Matchmaker, make me a match

Why do players in the past play much longer tournaments than today's top players?

Why did Harry Potter get a bedroom?

What was the definition of "set" that resulted in Russell's Paradox

Why are Hobbits so fond of mushrooms?

Can fluent English speakers distinguish “steel”, “still” and “steal”?

Graduate student with abysmal English writing skills, how to help

How would vampires avoid contracting diseases?

How to wire 3 hots / 3 neutrals into this new TR outlet with 2 screws?

Keep milk (or milk alternative) for a day without a fridge

How did the hit man miss?

Storming Area 51

How to properly say "bail on somebody" in German?

C program to parse source code of another language

Why were Er and Onan punished if they were under 20?



how to display 2 sets of lists in the same list using ngFor (nativescript)


How to initialize all members of an array to the same value?How to convert an Array to a Set in JavaHow to remove the first Item from a list?*ngIf and *ngFor on same element causing errorDoes Nativescript using Angular2 need special a *ngFor?In angular2 & nativescript the *ngFor display array's elements on top of each otherHow to make *ngFor work with an ObservableArray in Nativescript?Dynamic object key to display *ngFor in Nativescript with AngularIs *ngFor stable for lists in Nativescript Angular?How to Nest List Views in NativeScript






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Using nativescript to develop an iphone app. I'm trying to display 2 lists using ngFor to loop through an array.



for example...my data looks like this



object (this.metroGroup):




YL: [
"Line": "Shady Grove",
"Min": 2,
,
"Line": "Glenmont",
"Min": 4,
],
GR: [
"Line": "Blue Field",
"Min": 6,
,
"Line": "Green Line",
"Min": 8,
]



Template code:



<ScrollView row="1">
<StackLayout *ngIf="metroGroup.GR">
<Label text="Green" class="train-stop-label"></Label>
<StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
<Label class="h3" [text]="metro.Line"></Label>
<Label class="h3" [text]="metro.Min"></Label>
</StackLayout>
</StackLayout>
<StackLayout *ngIf="metroGroup.YL">
<Label text="Yellow" class="train-stop-label"></Label>
<StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
<Label class="h3" [text]="metro.Line"></Label>
<Label class="h3" [text]="metro.Min"></Label>
</StackLayout>
</StackLayout>
</ScrollView>


right now only the yellow is displayed....it seems like the yellow stacks on top of the green list. have any ideas on how to display both at the same time?










share|improve this question




























    0















    Using nativescript to develop an iphone app. I'm trying to display 2 lists using ngFor to loop through an array.



    for example...my data looks like this



    object (this.metroGroup):




    YL: [
    "Line": "Shady Grove",
    "Min": 2,
    ,
    "Line": "Glenmont",
    "Min": 4,
    ],
    GR: [
    "Line": "Blue Field",
    "Min": 6,
    ,
    "Line": "Green Line",
    "Min": 8,
    ]



    Template code:



    <ScrollView row="1">
    <StackLayout *ngIf="metroGroup.GR">
    <Label text="Green" class="train-stop-label"></Label>
    <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
    <Label class="h3" [text]="metro.Line"></Label>
    <Label class="h3" [text]="metro.Min"></Label>
    </StackLayout>
    </StackLayout>
    <StackLayout *ngIf="metroGroup.YL">
    <Label text="Yellow" class="train-stop-label"></Label>
    <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
    <Label class="h3" [text]="metro.Line"></Label>
    <Label class="h3" [text]="metro.Min"></Label>
    </StackLayout>
    </StackLayout>
    </ScrollView>


    right now only the yellow is displayed....it seems like the yellow stacks on top of the green list. have any ideas on how to display both at the same time?










    share|improve this question
























      0












      0








      0








      Using nativescript to develop an iphone app. I'm trying to display 2 lists using ngFor to loop through an array.



      for example...my data looks like this



      object (this.metroGroup):




      YL: [
      "Line": "Shady Grove",
      "Min": 2,
      ,
      "Line": "Glenmont",
      "Min": 4,
      ],
      GR: [
      "Line": "Blue Field",
      "Min": 6,
      ,
      "Line": "Green Line",
      "Min": 8,
      ]



      Template code:



      <ScrollView row="1">
      <StackLayout *ngIf="metroGroup.GR">
      <Label text="Green" class="train-stop-label"></Label>
      <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
      <Label class="h3" [text]="metro.Line"></Label>
      <Label class="h3" [text]="metro.Min"></Label>
      </StackLayout>
      </StackLayout>
      <StackLayout *ngIf="metroGroup.YL">
      <Label text="Yellow" class="train-stop-label"></Label>
      <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
      <Label class="h3" [text]="metro.Line"></Label>
      <Label class="h3" [text]="metro.Min"></Label>
      </StackLayout>
      </StackLayout>
      </ScrollView>


      right now only the yellow is displayed....it seems like the yellow stacks on top of the green list. have any ideas on how to display both at the same time?










      share|improve this question














      Using nativescript to develop an iphone app. I'm trying to display 2 lists using ngFor to loop through an array.



      for example...my data looks like this



      object (this.metroGroup):




      YL: [
      "Line": "Shady Grove",
      "Min": 2,
      ,
      "Line": "Glenmont",
      "Min": 4,
      ],
      GR: [
      "Line": "Blue Field",
      "Min": 6,
      ,
      "Line": "Green Line",
      "Min": 8,
      ]



      Template code:



      <ScrollView row="1">
      <StackLayout *ngIf="metroGroup.GR">
      <Label text="Green" class="train-stop-label"></Label>
      <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
      <Label class="h3" [text]="metro.Line"></Label>
      <Label class="h3" [text]="metro.Min"></Label>
      </StackLayout>
      </StackLayout>
      <StackLayout *ngIf="metroGroup.YL">
      <Label text="Yellow" class="train-stop-label"></Label>
      <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
      <Label class="h3" [text]="metro.Line"></Label>
      <Label class="h3" [text]="metro.Min"></Label>
      </StackLayout>
      </StackLayout>
      </ScrollView>


      right now only the yellow is displayed....it seems like the yellow stacks on top of the green list. have any ideas on how to display both at the same time?







      arrays angular nativescript ngfor nativescript-angular






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 2:37









      jeremyjeremy

      1852 silver badges14 bronze badges




      1852 silver badges14 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          1














          You need a parent Layout. I have created a sample playground for you.



          <ScrollView class="page">
          <StackLayout class="home-panel">
          <StackLayout *ngIf="metroGroup.GR">
          <Label text="Green" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          <StackLayout *ngIf="metroGroup.YL">
          <Label text="Yellow" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          </StackLayout>
          </ScrollView>





          share|improve this answer


















          • 1





            thanks worked...just needed another stacklayout to nest these into

            – jeremy
            Mar 26 at 3:14










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349064%2fhow-to-display-2-sets-of-lists-in-the-same-list-using-ngfor-nativescript%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          You need a parent Layout. I have created a sample playground for you.



          <ScrollView class="page">
          <StackLayout class="home-panel">
          <StackLayout *ngIf="metroGroup.GR">
          <Label text="Green" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          <StackLayout *ngIf="metroGroup.YL">
          <Label text="Yellow" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          </StackLayout>
          </ScrollView>





          share|improve this answer


















          • 1





            thanks worked...just needed another stacklayout to nest these into

            – jeremy
            Mar 26 at 3:14















          1














          You need a parent Layout. I have created a sample playground for you.



          <ScrollView class="page">
          <StackLayout class="home-panel">
          <StackLayout *ngIf="metroGroup.GR">
          <Label text="Green" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          <StackLayout *ngIf="metroGroup.YL">
          <Label text="Yellow" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          </StackLayout>
          </ScrollView>





          share|improve this answer


















          • 1





            thanks worked...just needed another stacklayout to nest these into

            – jeremy
            Mar 26 at 3:14













          1












          1








          1







          You need a parent Layout. I have created a sample playground for you.



          <ScrollView class="page">
          <StackLayout class="home-panel">
          <StackLayout *ngIf="metroGroup.GR">
          <Label text="Green" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          <StackLayout *ngIf="metroGroup.YL">
          <Label text="Yellow" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          </StackLayout>
          </ScrollView>





          share|improve this answer













          You need a parent Layout. I have created a sample playground for you.



          <ScrollView class="page">
          <StackLayout class="home-panel">
          <StackLayout *ngIf="metroGroup.GR">
          <Label text="Green" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.GR" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          <StackLayout *ngIf="metroGroup.YL">
          <Label text="Yellow" class="train-stop-label"></Label>
          <StackLayout *ngFor="let metro of metroGroup.YL" class="list-group-item">
          <Label class="h3" [text]="metro.Line"></Label>
          <Label class="h3" [text]="metro.Min"></Label>
          </StackLayout>
          </StackLayout>
          </StackLayout>
          </ScrollView>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 3:09









          NarendraNarendra

          2,8132 gold badges9 silver badges26 bronze badges




          2,8132 gold badges9 silver badges26 bronze badges







          • 1





            thanks worked...just needed another stacklayout to nest these into

            – jeremy
            Mar 26 at 3:14












          • 1





            thanks worked...just needed another stacklayout to nest these into

            – jeremy
            Mar 26 at 3:14







          1




          1





          thanks worked...just needed another stacklayout to nest these into

          – jeremy
          Mar 26 at 3:14





          thanks worked...just needed another stacklayout to nest these into

          – jeremy
          Mar 26 at 3:14








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55349064%2fhow-to-display-2-sets-of-lists-in-the-same-list-using-ngfor-nativescript%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현