Closed stcalica closed 7 years ago
issue: Unknown provider: ngCartProvider <- ngCart <- mainController
Unknown provider: ngCartProvider <- ngCart <- mainController
I have no idea why this is happening. I'm starting to think this is outdated and it doesn't seem like he or anyone else supports this project anymore. Because of Angular2 perhaps?
var dependencies = [ 'ngRoute', 'ngCart' ]; angular.module('test', dependencies).config(Config); Config.$inject = [ '$locationProvider', 'ngCartProvider'];
angular.module('test').controller('mainController', mainController); mainController.$inject = [ '$scope', '$http', 'ngCart' ]; function mainController( $scope, $http, ngCart){ //inside controler }
<script type="text/javascript" src="/libraries/angular/angular.min.js"></script> <script type="text/javascript" src="/libraries/angular-route/angular-route.min.js"></script> <script type="text/javascript" src="/libraries/ngCart/dist/ngCart.js"></script> <script type="text/javascript" src="/app.js"></script> <script type="text/javascript" src="/module/config/test.client.routes.js"></script> <script type="text/javascript" src="/module/controllers/test.client.main.js"></script>
finally found it. accidentally had two app.js files!
issue:
Unknown provider: ngCartProvider <- ngCart <- mainController
I have no idea why this is happening. I'm starting to think this is outdated and it doesn't seem like he or anyone else supports this project anymore. Because of Angular2 perhaps?