0
votes

I'm using Ionic framework for my native apps but i can only use ion-item and ion-option-button. When i attempt to use any of the ionic items such as ion-input and ion-select nothing shows up?

I assume that i don't have the full Ionic libraries or I'm missing something. I don't even have any .ts in my project which is unusual for Ionic framework.

Here's the files that i have currently:

File Structure and code

Code that works:

<ion-view view-title="Find Jobs">
  <ion-content>
    <div class="small-paragraph">FOUND: 5 &bull; LAST UPDATED: 26/07/2019</div>
    <ion-list>
      <ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="job in jobs" type="item-text-wrap" href="#/tab/jobs/{{job.id}}">
        <img ng-src="{{job.logo}}">
        <h2>{{job.title}}</h2>
        <p>{{job.category}} &bull; {{job.salary}} &bull; {{job.location}}</p>
        <i class="icon ion-chevron-right icon-accessory"></i>

        <ion-option-button class="button-saved" ng-click="save(job)">
          Save Job
        </ion-option-button>
      </ion-item>
    </ion-list>
  </ion-content>
</ion-view>

Code that doesn't work:

<ion-view view-title="My Account">
  <ion-content>
    <ion-list>
      <ion-input value="Full Name" readonly></ion-input>
      <ion-item>
          <ion-label>Gender</ion-label>
          <ion-select placeholder="Select One">
            <ion-select-option value="f">Female</ion-select-option>
            <ion-select-option value="m">Male</ion-select-option>
          </ion-select>
        </ion-item>
    </ion-list>
  </ion-content>
</ion-view>

It just seems like I can add any text boxes, select boxes and all other Ionic controls. There seems to be something missing. Any ideas?

1

1 Answers

0
votes

Did you import the "IonicModule" in your module container? You have to import the IonicModule to access to all the custom components of Ionic

Should be something like this:

@NgModule({
    imports: [
        ...
        IonicModule,
        ...
    ],
})