IONIC-4 Navigation - how get parameter passed - ionic-framework

Iam new to Ionic - 4.
I have function which is navigated to my items page.
gradeItem = function(data){
this.navCtrl.navigate('grade/items', {data:data});
}
and it is successfully navigating.
Now I want to access my parameter data from my items.page.ts file.
can anyone please help me on this.I tried navParams but it throwing error like
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[ItemsPage -> NavParams]:

Related

Fatal error: Uncaught Error: Call to a member function toHtml() on boolean

I am using Magento 2 and porto theme. My issue is with layered navigation.
When I search anything in my store results shows along with custom attribute filters, created through Store > Attribute > Product.
When results shows and I click on attribute to filter further ajax loads and nothing happens.
These are the errors I can see in console.
Fatal error: Uncaught Error: Call to a member function toHtml() on boolean in /app/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index.php:132
Stack trace:
#0 /public_html/generated/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index/Interceptor.php(24): Mageplaza\LayeredNavigation\Controller\Search\Result\Index->execute()
#1 /public_html/vendor/magento/framework/App/Action/Action.php(107): Mageplaza\LayeredNavigation\Controller\Search\Result\Index\Interceptor->execute()
#2 /public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /public_html/vendor/magento/framework/Interception/Interceptor.php(138): Mageplaza\LayeredNavigation\Controller\Search\Result\Index\Interceptor->___callParent('dispatch', Array)
#4 /public_html/vendor/magento/framework/Interception/Interceptor.php(153): Mageplaza\LayeredNa in /public_html/app/code/Mageplaza/LayeredNavigation/Controller/Search/Result/Index.php on line 132
Please help.
Thank you in advance.

Exception - Call to undefined function course_overviewfiles_options()

I am using a Moodle(3.2.2 the newest one) site created by php7.0 and mysql5.7,but when i try to add a new course as administrator, an error called :Exception - Call to undefined function course_overviewfiles_options(). What can i do to fix it?
I did 'Purge all caches' from Development,so the problem above disappeared,but
when users login, another error occurred: Exception - Call to undefined function core_login_get_return_url().
I did 'Purge all caches'again, the problem no.2 disappeared and the no.1 occurred again.
did you include the correct library resource file?
require_once($CFG->libdir. '/coursecatlib.php'); (I think)
HTH

SAPUI5 - Uncaught TypeError: this.getRouter.navTo is not a function

I am referring to the code used in tdg master-detail demokit application.
I am getting an error "Uncaught TypeError: this.getRouter.navTo is not a function".
I have written a console.log("is router fine? "+ this.getRouter().toLocaleString()); before this.getRouter.navTo which prints as
"EventProvider company.accounts_positions_splitpage.MyRouter"
Any suggestions what is the issue?
Thanks
You have to call
this.getRouter().navTo()
instead of
this.getRouter.navTo()
With this.getRouter you do not execute the function, you just get the function as Object. There you try too execute the function navTo(), but that object itselve does not provide such a function.
With this.getRouter() you execute the function and you get the return value (a router) as Object. On that router you can now use navTo(), as you did in your console.log.

Meteor error in trying to use collections

I am currently pulling data from collections in the MongoDB but there are 2 in particular that will not work either giving me the following error:
Exception from sub Assets id i574gxNDc9RdHERNn TypeError: Cannot call method 'find' of undefined
Or:
TypeError: Cannot call method 'attachSchema' of undefined
Or:
Object # has no method 'attachSchema'
depending on how I configure it. Does anyone have an idea of what I am doing wrong. I am using the same code for the ones that work as well as the ones that are throwing errors.
The collection looks like this:
Assets = Collections.Assets = Meteor.Assets;
Querying in server/publish.js:
Meteor.publish("Assets", function (){
return Meteor.Assets.find({});
});
Changing it to:
new Mongo.Collection('Assets');
Gives error:
Exception from sub Assets id ZgzZyNYPmMr5gtFGn TypeError: Cannot call method 'find' of undefined
Running the following from the command line in the top (root) directory of the project might fix this (it helped me):
meteor add aldeed:collection2

Why does second load of this dart:js date picker code error?

I use the following code in dart (chrome app):
js.context.callMethod(r'$', ['.datepicker']).callMethod('datepicker', [new js.JsObject.jsify({'format':'yyyy-mm-dd'})]);
which works fine the first time this code is rendered. However, if I navigate away and back to the page, I get the following error:
Uncaught Uncaught Error: NullError: Cannot call "split" on null
Stack Trace:
TypeError: Cannot read property 'split' of undefined
at Object.DPGlobal.parseDate (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:393:20)
at Datepicker.update (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:161:25)
at new Datepicker (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:84:8)
at HTMLDivElement.<anonymous> (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:341:38)
at Function.n.extend.each (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/jquery-2.1.3.min.js:2:2882)
at n.fn.n.each (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/jquery-2.1.3.min.js:2:847)
at $.fn.datepicker (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/js/bootstrap-datepicker.js:336:15)
at JsObject.callMethod$2 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:19892:42)
at navAccTranS24_closure.call$1 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:23116:58)
at _RootZone.runUnary$2 (chrome-extension://lgndonjnifhllkkomohiinkfdaphgalc/b2015.dart.js:10124:18)
By navigate I mean I use children.clear() on the holding div the re-populate it with new html.
I presume I should only run this code once, or 'unload' it when I navigate away but I am just guessing here and would appreciate a solution.