Question: how to pass data from one controller to another using angularjs?
Answer: var app = angular. module("MyApp", []);
/* Create Products service */
app. service('Products', function () {
this. Items = function() {
// if we want can get data from database.
product = { product: '', price: '' }
};
return this;