I am following an tutorial on Pluralsight to build a web app and I am getting an error connecting team.html and team-detail.html. What does "ui-sref = "app.game({id: game.gameId}" on Line 4 of team-detail.html do? Is it correct?
My error says:
TypeError: Cannot read property 'name' of undefined
at new TeamDetailCtrl (team-detail-ctrl.js:18)
at Object.invoke (ionic.bundle.js:11994)
at extend.instance (ionic.bundle.js:16247)
at ionic.bundle.js:15502
at forEach (ionic.bundle.js:8155)
at nodeLinkFn (ionic.bundle.js:15501)
at compositeLinkFn (ionic.bundle.js:14887)
at publicLinkFn (ionic.bundle.js:14766)
at self.appendViewElement (ionic.bundle.js:47324)
at Object.switcher.render (ionic.bundle.js:45864)ionic.bundle.js:19387 (anonymous function)
Here's a link to the code I have halfway through the tutorial:
https://github.com/bhaskar2khaneja/EliteScheduleApp/tree/master/www
Also, I do not understand what <.. href = "#/app/teams/{{team.id}}"> is doing in the standings.html file. It's not producing the output I am expecting on clicking different items in the file.
Here's the data the app is using: http://elite-schedule.net/api/leaguedata/2009
Related
I am getting this error when running a Salesforce scratch org application;
aura_proddebug.js:274 Uncaught (in promise) TypeError: Cannot read property 'Symbol(ViewModel)' of undefined
at getInternalField (aura_proddebug.js:274)
at Object.update (aura_proddebug.js:1793)
at updateCustomElmDefaultHook (aura_proddebug.js:5627)
at Object.update (aura_proddebug.js:5779)
at patchVnode (aura_proddebug.js:5021)
at updateStaticChildren (aura_proddebug.js:5000)
at aura_proddebug.js:5542
at runWithBoundaryProtection (aura_proddebug.js:8255)
at updateChildrenHook (aura_proddebug.js:5541)
at Object.update (aura_proddebug.js:5751)
Has anyone experienced this before?
I was actually able to spot the issue.
This error has been thrown before in my org when I either didn't have the .html file or I had it with an improper spelling somehow; include case sensitivity on the names.
See related here:
Why is a variable accessible from inside a method but not from the browser console?
I have the following typescript code, using angular6, run via ng serve on Windows 10, current Chrome.
import * as d3 from "d3"; // from "npm i d3 --save" version 5.7
// picking a member of d3, nothing magical about "scaleLinear" here
console.log("see", d3.scaleLinear) // it prints ok, ƒ linear() {...
// angular component code fragment below
somefunction() {
console.log("see again", d3.scaleLinear) // it prints ok, again
// add a break here
}
I drive the code to that somefunction. At break, in Chrome console when I try:
> console.log(d3.scaleLinear)
it throws an error:
VM2012:1 Uncaught ReferenceError: d3 is not defined
at eval (eval at push../src/app/user-sel/user-sel.component.ts.UserSelComponent._resyncYSel (user-sel.component.ts:58), <anonymous>:1:13)
at UserSelComponent.push../src/app/user-sel/user-sel.component.ts.UserSelComponent._resyncYSel (user-sel.component.ts:58)
at UserSelComponent.push../src/app/user-sel/user-sel.component.ts.UserSelComponent.selYSel (user-sel.component.ts:166)
at Object.eval [as handleEvent] (UserSelComponent.html:75)
at handleEvent (core.js:21673)
at callWithDebugContext (core.js:22767)
at Object.debugHandleEvent [as handleEvent] (core.js:22470)
at dispatchEvent (core.js:19122)
at core.js:19569
at HTMLSpanElement.<anonymous> (platform-browser.js:993)
How can I access d3 in console directly? What did I miss? I looked at old SO questions on this topic 52332640 but could not find a conclusive answer.
If your pages have any frames, your console could be running in the wrong context.
There is a dropdown that will allow you to specify the correct context
For example, in this screenshot, there are two IFrame elements. In order to access variables from scripts running in "contentIframe2" I have to switch the context
In development mode everything working but when i'm running my angular 6 app in production mode where it's generating deploying files as shown in the screen shot.
It's throwing error shown below and can also bee seen in the screen shot above. The generated main script is trying to return new t where t is not a constructor.
main.8a1f9e821b7c8c76e49b.js:1 Uncaught TypeError: t is not a constructor
at main.8a1f9e821b7c8c76e49b.js:1
at Ao (main.8a1f9e821b7c8c76e49b.js:1)
at main.8a1f9e821b7c8c76e49b.js:1
at new e (main.8a1f9e821b7c8c76e49b.js:1)
at Object.Xo [as createNgModuleRef] (main.8a1f9e821b7c8c76e49b.js:1)
at t.create (main.8a1f9e821b7c8c76e49b.js:1)
at main.8a1f9e821b7c8c76e49b.js:1
at e.invoke (polyfills.b134ad1096bf06acde05.js:1)
at Object.onInvoke (main.8a1f9e821b7c8c76e49b.js:1)
at e.invoke (polyfills.b134ad1096bf06acde05.js:1)
I have commented all the switch statements in my application. Still I'm not able to find out/debug from where it's throwing this exception.
Can anyone suggest me how I can fix/debug this problem.?
Please let me know if any other inputs required.
The Console shows this
main.598d68d658cf204b66cd.bundle.js:1 ERROR TypeError: Failed to execute 'removeEventListener' on 'EventTarget': The callback provided as parameter 2 is not a function.
at r.(anonymous function).XMLHttpRequest.t.responseBlob.o.function.a.(anonymous function).r.(anonymous function).(anonymous function) [as __zone_symbol__open] (https://salty-fjord-85026.herokuapp.com/polyfills.62d8ac97edff2dddd48f.bundle.js:1:132920)
at https://salty-fjord-85026.herokuapp.com/polyfills.62d8ac97edff2dddd48f.bundle.js:1:142082
at r.(anonymous function).i.(anonymous function) [as open] (https://salty-fjord-85026.herokuapp.com/polyfills.62d8ac97edff2dddd48f.bundle.js:1:133379)
at t._subscribe (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:647355)
at t._trySubscribe (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:98272)
at t.subscribe (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:98101)
at e.a (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:695746)
at e._innerSub (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:718260)
at e._tryNext (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:718184)
at e._next (https://salty-fjord-85026.herokuapp.com/main.598d68d658cf204b66cd.bundle.js:1:718007)
but deployment was successful
you can visit the site dev server here
you can look at the code here github
and get in depth understanding of the issue.
thank you all in Advanced
Despite not using the filter helper in a template a TypeError is preventing assemble completing. It looks like the options parameter isn't being passed or is being passed as undefined.
Here's the stack trace:
Warning: Cannot read property 'data' of undefined Use --force to continue.
TypeError: Cannot read property 'data' of undefined
at Object.helpers.filter (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars-helpers/lib/helpers/helpers-collections.js:357:15)
at Object.eval (eval at <anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:564:23), <anonymous>:41:50)
at Object.<anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:30:33)
at Object.search (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1274:21)
at Object.Handlebars.VM.invokePartial (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:81:28)
at Object.eval (eval at <anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:564:23), <anonymous>:86:17)
at /home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:30:33
at /home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1274:21
at Object.render (/home/tim/workspace/ae_projects/severine/node_modules/assemble/node_modules/assemble-handlebars/index.js:38:17)
at Object.render (/home/tim/workspace/projects/severine/node_modules/assemble/lib/engine.js:87:17)
Aborted due to warnings.
If I comment out the body of the filter function, assemble runs normally.
#tim we usually see these errors when there's a conflict with a property name on the data context and a handlebars helper.
If you have filter as a property in your data context, try using {{this.filter}} instead of {{filter}} to give Handlebars a hint that it should be using the property instead of the helper.
This question is from this issue on Github. I hope this helps anyone else having the same issue.