I'm currently working on a new Rails 4.2.0 app with Angular.js deployed on Heroku. Here's the angular.js controller I've implemented:
angular.module("CarDealer.controllers",[]).controller('carsController', function ($scope, carDealerAPIservice) {
$scope.nameFilter = null;
$scope.carsList = [];
carDealerAPIservice.getCars().success(function (response) {
$scope.carsList = response;
});
});
In my view, I have the following setup:
<div class="row" data-ng-controller="carsController">
<div class="row">
<div class="col-md-4">
<input type="text" ng-model="nameFilter" placeholder="Find vehicle..." class="form-control" autofocus="true"/>
</div>
</div>
<ul data-ng-repeat="car in carsList | filter: nameFilter">
<li>{{ car.model_name }} - {{ car.year }} </li>
</ul>
However, upon opening the page, nothing renders and I get the following error in the console:
Error: [$injector:unpr] Unknown provider: eProvider <- e <- carsController
While everything operates smoothly in development mode, production mode presents this issue. How can I resolve it? Disabling asset compression hasn't helped so far.
Your help is much appreciated.