[4.0.0-beta19] Import Content gives Error has no exported member 'Content'.
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: Upon upgrading to Bet19 including dependant angular packages, i am getting an error;
[ng] src/app/pages/setting/setting-user-terms/setting-user-terms.page.ts(2,10): error TS2305: Module '"/Users/core/www/ourmgmt-client/node_modules/@ionic/angular/dist/index"' has no exported member 'Content'.
[ng]
Upon investigation I am importing Content from @ionic/angular. If I remove the reference it compiles. Has support for content been deprecated in Ionic 4.0.19?
Related code:
import { Component, ViewChild, OnInit } from '@angular/core';
import { Content, ModalController } from '@ionic/angular';
@Component({
selector: 'app-setting-user-terms',
templateUrl: './setting-user-terms.page.html',
styleUrls: ['./setting-user-terms.page.scss'],
})
export class SettingUserTermsPage implements OnInit {
@ViewChild(Content) content: Content;
constructor(private modalCtrl: ModalController) {
}
ngOnInit() {
}
dismiss(): void {
this.modalCtrl.dismiss();
}
/*
** name: Scroll To Top
** desc: Scroll To Top(for pagaination in survey mode)
*/
scrollTo(value: string) {
let yOffset = document.getElementById(value).offsetTop;
this.content.scrollToPoint(0, yOffset, 1000);
}
}
Other information:
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.19
@angular-devkit/build-angular : 0.10.6
@angular-devkit/schematics : 7.1.2
@angular/cli : 7.1.3
@ionic/angular-toolkit : 1.2.0
Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 9 other plugins)
System:
ios-deploy : 1.9.1
NodeJS : v10.10.0 (/usr/local/bin/node)
npm : 6.5.0
OS : macOS High Sierra
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Importing a newly created component gives error "module has ...
To export a component you need explicitly write a component name in exports section. For example: @NgModule({ declarations: [ YourComponent ] ...
Read more >Angular Material “has no exported member 'MaterialModule'”
It is in beta, so you can't really bitch about it. But, here is what to do about them,. a) There is no...
Read more >Module '"@prismicio/client"' has no exported member 'Content'
As title states, I'm getting this error: This is my prismic.ts: import * as prismic from '@prismicio/client'; import * as prismicNext from ...
Read more >NG8003: No directive found with export - Angular
NG8003: No directive found with exportlink. Contents ... and declare it in our list of imports in *.module.ts to resolve the missing export...
Read more >Module '"@microsoft/sp-http"' has no exported member ...
Hi, I am trying to use SPHttpClientBatch class and I am getting the error: Module '"@microsoft/sp-http"' has no exported member ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks mate, rebooting my text editor worked. I couldn’t find this as a breaking change in Ionic/Changelog, is it in there?
Also I am getting another error now, I’ll make it another issue, unless you know the issue behind this error?
It needs to be refreshed. Try ctrl + clicking on @ionic/angular so it will detect the update.