Error: [$injector:modulerr] Failed to instantiate module Restaurante due to:
Error: [$injector:modulerr] Failed to instantiate module ngSocket due to:
Error: [$injector:nomod] Module 'ngSocket' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
have you tried the array injection technique?
controller('VendasCtrl',['$scope', '$socket', 'vendas', function($scope, $socket, vendas) {...})]);
Other than that, this looks exactly like my working setup.
I am using ng-scaffold and I got the error:
My scripts on page are:
In config.js
angular.module('Restaurante.config', [
'produtos', 'template.app', 'ui.router', 'ngAnimate', 'ngCookies', 'ngResource', 'ngSanitize', 'ngTouch', 'ngSocket' ])....
and in app.js
angular.module('Restaurante', [ 'Restaurante.config', 'service.produtos', 'service.vendas', 'ngSocket' ])...... .controller('VendasCtrl', function($scope, $socket, vendas) { 'use strict'; $scope.isLoading = true; $scope.produtos = vendas.getAtivo(function() { $scope.isLoading = false; }); ....
and the error is same...