function foo() {
return $http.get('/foo');
}
function bar() {
return $http.get('/bar');
}
$q.all([
foo(),
bar()
]).then(function (results) {
// данные загружены
})
var myApp = angular.module('myApp', []);
// make a factory to share data between controllers
myApp.factory('Data', function(){
var data = {
firstName: ''
};
return {
getFirstName: function () {
return data.firstName;
},
setFirstName: function (firstName) {
data.firstName = firstName;
}
};
});
SELECT DATE_FORMAT(column_name, '%d/%m/%Y') FROM tablename
ngrok http 80