migrate from angular 1 to 5
falahatiali opened this issue · comments
Ali Falahati commented
hi alex.
i want implement project in angular 5. but i cant implement for example alert service that you write by animate.css. how i can convert following code to angular cli ?
angular.module('clientApp').service('alert', function alert($rootScope, $timeout) {
var alertTimeout;
return function (type, title, message, timeout) {
$rootScope.alert = {
hasBeenShown: true,
show: true,
type: type,
message: message,
title: title
};
$timeout.cancel(alertTimeout);
alertTimeout = $timeout(function () {
$rootScope.alert.show = false;
}, timeout || 3000);
}
});
Israel Perales commented
Close this issue please, angular 1(js) ≠ angular 2 (typescript)