Ionic components can't access providers

@jamesharvey In one of your responses you say that the ngFor directive (angular estructural directive) isn’t working, so it doesn’t seem to be your DataProvider (otherwise you would be receiving an error about this provider).

For ngFor to work you need to import CommonModule in your components module:

import { CommonModule } from '@angular/common';

Probably related:

If the error is not about the ngFor, can you post the error? (that shows in your console)

1 Like

Thanks, CommomModule is properly imported in components.module. I’m guessing Ionic conference app has a problem… I will create a brand new project and double check. This should be working…

Jame - this is a daft question but I just want to check.

As well as importing the provider into the custom component make sure you have it declared in the constructor of the component - for example:

constructor(public lvdata: Lvdata) {}

1 Like

Yes, I did that for sure… but had no luck. It looks something’s wrong with my setup but I can’t figure that out.
Instead, I just went with div tags and they’re working well. When I think about it, it’s fine because angular will put them into a single HTML file and minimize them anyways.
Thanks for all your helps.