Skip to content

Instantly share code, notes, and snippets.

View LucaLanziani's full-sized avatar

Luca Lanziani LucaLanziani

View GitHub Profile
(function () {
/*jshint laxcomma:true, asi:true */
'use strict';
var CONTROLLER_NAME = "MessagesCtrl";
function controller($scope, $timeout, loading) {
$scope.messages = [];
var messages_type = ["alert-info",
"alert-success",
AngularApp
.run(["$rootScope", function ($rootScope) {
$rootScope.log_http_response = function (what, callback) {
return function (data, status, headers, config) {
console.log(what, data, status, headers, config);
(callback || angular.noop)(data, status, headers, config);
};
};
$rootScope.message = function () {
var args = Array.prototype.slice.call(arguments);