Title: Modal unknown provider · Issue #2247 · angular-fullstack/generator-angular-fullstack · GitHub
Open Graph Title: Modal unknown provider · Issue #2247 · angular-fullstack/generator-angular-fullstack
X Title: Modal unknown provider · Issue #2247 · angular-fullstack/generator-angular-fullstack
Description: I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests. Item Version generator-angular-fullstack 4.0.4 Node 5.4.0 npm 3.10.7 Operating System cloud9 Item ...
Open Graph Description: I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests. Item Version generator-angular-fullstack 4.0.4 Node 5.4.0 ...
X Description: I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests. Item Version generator-angular-fullstack 4.0.4 Node 5.4.0 ...
Opengraph URL: https://github.com/angular-fullstack/generator-angular-fullstack/issues/2247
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Modal unknown provider","articleBody":"- [X] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.\n\n| Item | Version |\n| --- | --- |\n| generator-angular-fullstack | 4.0.4 |\n| Node | 5.4.0 |\n| npm | 3.10.7 |\n| Operating System | cloud9 |\n\n| Item | Answer |\n| --- | --- |\n| Transpiler | Babel |\n| Markup | HTML |\n| CSS | SCSS |\n| Router | ui-router |\n| Client Tests | Mocha |\n| DB | MongoDB |\n| Auth | Y |\n\nI cannot figure out why the Modal service injection is not working. I have added it as a dependency to the app.js and as well have added the dependency to the controller which I would like to use it from. Very desperate to get this working and appreciate anyone who can help me figure this out.\n\n**app.js**\n\n```\nimport _Auth from '../components/auth/auth.module';\nimport account from './account';\nimport admin from './admin';\nimport navbar from '../components/navbar/navbar.component';\nimport footer from '../components/footer/footer.component';\nimport main from './main/main.component';\nimport constants from './app.constants';\nimport util from '../components/util/util.module';\nimport socket from '../components/socket/socket.service';\nimport modal from '../components/modal/modal.service';\n\nimport './app.scss';\n\nangular.module('camdenfirstApp', [ngCookies, ngResource, ngSanitize, 'btford.socket-io', uiRouter,\n uiBootstrap, modal, _Auth, account, admin, navbar, footer, main, constants, socket, util, 'leaflet-directive'\n ])\n .config(routeConfig)\n .run(function($rootScope, $location, Auth) {\n 'ngInject';\n // Redirect to login if route requires auth and you're not logged in\n```\n\n**controller trying to use the Modal**\n\n```\nimport angular from 'angular';\nimport uiRouter from 'angular-ui-router';\nimport routing from './main.routes';\n\nexport class MainController {\n $http;\n socket;\n Modal;\n awesomeThings = [];\n newThing = '';\n camden = {autoDiscover:true};\n locFound = false;\n\n /*@ngInject*/\n constructor($http, $scope, socket, Modal) {\n this.Modal = Modal;\n this.$http = $http;\n this.socket = socket;\n\n $scope.$on('$destroy', function() {\n socket.unsyncUpdates('thing');\n });\n\n $scope.delete = this.Modal.confirm.delete()('asdf');\n\n $scope.events = { // or just {} //all events\n markers:{\n enable: [ 'dragend' ]\n //logic: 'emit'\n }\n }\n\n $scope.camden = {autoDiscover:true};\n\n $scope.$on('leafletDirectiveMap.locationfound', function(event){\n $scope.eventDetected = \"ZoomStart\";\n var instancePosition = {\n lat: $scope.camden.lat,\n lng: $scope.camden.lng,\n focus: true,\n message: \"Drag to Flooding Instance\",\n draggable: true\n };\n\n $scope.markers = {\n instancePosition: angular.copy(instancePosition)\n }\n });\n\n $scope.$on(\"leafletDirectiveMarker.dragend\", function(event, args){\n $scope.camden.lat = args.model.lat;\n $scope.camden.lng = args.model.lng;\n $scope.markers.instancePosition.lat = args.model.lat;\n $scope.markers.instancePosition.lng = args.model.lng;\n });\n\n }\n\n\n $onInit() {\n this.$http.get('/api/things')\n .then(response =\u003e {\n this.awesomeThings = response.data;\n this.socket.syncUpdates('thing', this.awesomeThings);\n });\n }\n\n\n addThing() {\n if(this.newThing) {\n this.$http.post('/api/things', {\n name: this.newThing\n });\n this.newThing = '';\n }\n }\n\n deleteThing(thing) {\n this.$http.delete('/api/things/' + thing._id);\n }\n}\n\nexport default angular.module('camdenfirstApp.main', [uiRouter])\n .config(routing)\n .component('main', {\n template: require('./main.html'),\n controller: MainController\n })\n .name;\n```\n\nEDIT: if you;d like to see the project itself you can find it here: https://camden-first-hopeworks.c9users.io:8081/\n","author":{"url":"https://github.com/hopeworkscamden","@type":"Person","name":"hopeworkscamden"},"datePublished":"2016-09-20T17:50:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/2247/generator-angular-fullstack/issues/2247"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d1c20fda-95d5-6873-7472-98ab7303829f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C45E:39E51F:2B710CF:38CA9C1:696B7301 |
| html-safe-nonce | 1dba4608f0c13f51cc67f80ff93a66754ecfcab4e00133e8fda13ca63b750501 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDVFOjM5RTUxRjoyQjcxMENGOjM4Q0E5QzE6Njk2QjczMDEiLCJ2aXNpdG9yX2lkIjoiODgyOTQzMjgxMDY5MTA2NDU3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 885b350967611a0781fad6755fd50940d8316a1015e2b9bb865bdb66baed2563 |
| hovercard-subject-tag | issue:178128891 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular-fullstack/generator-angular-fullstack/2247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/214c6097e3f25bb3ebc49c33d3a5bedb0755673861edfb0f533586a924f25f8c/angular-fullstack/generator-angular-fullstack/issues/2247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/214c6097e3f25bb3ebc49c33d3a5bedb0755673861edfb0f533586a924f25f8c/angular-fullstack/generator-angular-fullstack/issues/2247 |
| og:image:alt | I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests. Item Version generator-angular-fullstack 4.0.4 Node 5.4.0 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hopeworkscamden |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/angular-fullstack/generator-angular-fullstack git https://github.com/angular-fullstack/generator-angular-fullstack.git |
| octolytics-dimension-user_id | 12663106 |
| octolytics-dimension-user_login | angular-fullstack |
| octolytics-dimension-repository_id | 13911118 |
| octolytics-dimension-repository_nwo | angular-fullstack/generator-angular-fullstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13911118 |
| octolytics-dimension-repository_network_root_nwo | angular-fullstack/generator-angular-fullstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width