ion-affix
ion-affix copied to clipboard
Runtime Error: Object(...) is not a function
I found this directive helpful in one of my project by looking at each demo. However, when I tried to integrate this to my project I got an error which says Object(...) is not a function as you can see below.
TypeError: Object(...) is not a function
at ContentAdapter.onScroll (http://localhost:8100/build/vendor.js:163017:65)
at IonAffix.ngAfterViewInit (http://localhost:8100/build/vendor.js:112992:52)
at callProviderLifecycles (http://localhost:8100/build/vendor.js:13433:18)
at callElementProvidersLifecycles (http://localhost:8100/build/vendor.js:13400:13)
at callLifecycleHooksChildrenFirst (http://localhost:8100/build/vendor.js:13383:29)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:14538:5)
at callViewAction (http://localhost:8100/build/vendor.js:14880:21)
at execEmbeddedViewsAction (http://localhost:8100/build/vendor.js:14838:17)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:14530:5)
at callViewAction (http://localhost:8100/build/vendor.js:14880:21)
The following are my Ionic info:
Ionic:
ionic (Ionic CLI) : 4.2.1 (C:\Users\omelsoft\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2-201807062122
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : android 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 5 other plugins)
System:
Android SDK Tools : 26.1.1 (C:\Users\omelsoft\AppData\Local\Android\sdk)
NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Managed to fix this by updating the onScroll() method to return just the ionScroll.
Though you might want to take a look if this has other compatibility issues.
Came here to post this issue but your solution worked for me. Many thanks!
Came here to post this issue but your solution worked for me. Many thanks!
I'm glad it helped you too. :)
@omelsoft Thanks, will have a look at the PR ASAP.
any news about PR?
Still having the issue. tried the onScroll() method but no help.