Skip to content

Instantly share code, notes, and snippets.

@matyax
Created April 27, 2015 23:35
Show Gist options
  • Save matyax/bcc982b19b30d8056a03 to your computer and use it in GitHub Desktop.
Save matyax/bcc982b19b30d8056a03 to your computer and use it in GitHub Desktop.
shiftsApp.factory('shiftData', function shiftDataFactory() {
return {};
});
//Paso selección vehículo
shiftsApp.controller('VehicleController', function ($scope, shiftData) {
$scope.setVehicle = function (id) {
shiftData.vehicle_id = id;
console.log(shiftData);
};
});
//Paso selección service
shiftsApp.controller('ServiceController', function ($scope, shiftData) {
console.log(shiftData); //tiene el vehicle_id elegido en el paso anterior
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment