script link works in plnkr but not in my project - javascript

I was trying to implement full row edit feature using ui-grid. Based on it I found the tutorial and I made plnkr of it.
I included some links in plnkr which is showing me result without any error, but I include that link my project it doesn't work
This script src file is not working in my project
<script src="https://rawgit.com/msrikanth508/uiGridInlineEditPOC/master/Js/vendor/ui-grid.js"></script>
Error which I am getting :-
angular.js:13602 Error: [$injector:unpr] Unknown provider: InlineEditProvider <- InlineEdit <- GridRow <- Grid <- gridClassFactory
http://errors.angularjs.org/1.5.6-build.4791+sha.5b053b1/$injector/unpr?p0=InlineEditProvider%20%3C-%20InlineEdit%20%3C-%20GridRow%20%3C-%20Grid%20%3C-%20gridClassFactory
at angular.js:68
at angular.js:4468
at Object.getService [as get] (angular.js:4621)
at angular.js:4473
at getService (angular.js:4621)
at injectionArgs (angular.js:4645)
at Object.invoke (angular.js:4670)
at Object.enforcedReturnValue (angular.js:4514)
at Object.invoke (angular.js:4678)
at Object.origProvider.$get (angular.js:4547)
If I dont include above link everything works fine.
here's the plnkr link
plnkr link of the working feature

Related

cannot see a variable from Chrome Console but it's accessible in code

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

Angular 5 issue with 'removeEventListener' on 'EventTarget' only on prod build. but No issues on Dev build

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

Angular js returning error Unknown provider:

I created a factory dtoResource.js to work with my data as per different form.
I am trying to inject this factory in autoQuoteCtrl in autoQuoteCtrl.js file.
But its giving error
angular.js:13424 Error: [$injector:unpr] Unknown provider: $resourceProvider <- $resource <- dtoResource
http://errors.angularjs.org/1.5.3/$injector/unpr?p0=%24resourceProvider%20%3C-%20%24resource%20%3C-NaNtoResource
at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:68:12
at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4418:19
at Object.getService [as get] (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4571:39)
at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4423:45
at getService (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4571:39)
at injectionArgs (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4595:58)
at Object.invoke (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4617:18)
at Object.enforcedReturnValue [as $get] (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4464:37)
at Object.invoke (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4625:19)
at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.js:4424:37
What I am missing here.
You need to include the angular-resource script. It's in a different module.
Here's a cdn reference you can use if you want.
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-resource.min.js"></script>
And make sure you add it as a dependency to your module:
var app = angular.module("autoQuote",["ui.router", "ngResource"]);

angular-dashboard-framework give me error Unknown provider: $uibModalProvider <- $uibModal <- adfDashboardDirective

I'm using angular-dashboard-framework. Its was working fine in ruby on rails application but when i separated from rails application its give me following error
Error: [$injector:unpr] Unknown provider: $uibModalProvider <- $uibModal <- adfDashboardDirective
http://errors.angularjs.org/1.4.4/$injector/unpr?p0=%24uibModalProvider%20%3C-%20%24uibModal%20%3C-%20adfDashboardDirective
at angular.js:68
at angular.js:4284
at Object.getService [as get] (angular.js:4432)
at angular.js:4289
at getService (angular.js:4432)
at Object.invoke (angular.js:4464)
at angular.js:7037
at forEach (angular.js:336)
at Object.<anonymous> (angular.js:7035)
at Object.invoke (angular.js:4473)
Kindly guide me.
It looks like the adfDashboard requires angular-bootstrap, could you try adding this and see if the error is still there ?

I am having trouble linking two pages in Ionic Framework

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

Categories