Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Angular component in Ionic

$
0
0

@arashbi wrote:

I am just starting ionic 2. I started from tutorial, and tried to make a component from the list on the list page.
So the template of the component looks like this

  <ion-list>
  	<button ion-item  class="item" *ngFor="#item of items" (click)="itemTapped($event, item)">
        <ion-icon name="{{item.icon}}" item-left></ion-icon>
      {{item.category}}
      <div class="item-note" item-right>
        {{item.description}}
      </div>
    </button>
    </ion-list>

And the page which includes this is

<ion-navbar *navbar>
    <button menuToggle>
        <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>My First List</ion-title>
</ion-navbar>

<ion-content>
   <items [items] = "items"></items>
</ion-content>

Everything works, except the css is in the page. css attributes are not added properly to the nodes , for example button doesn't have a class="item" as it should have, or the icon is not loaded at all. What is it I am missing?

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>