generator-gulp-angular icon indicating copy to clipboard operation
generator-gulp-angular copied to clipboard

migrate from angular 1 to 5

Open falahatiali opened this issue 7 years ago • 1 comments

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);
   }
 });

falahatiali avatar Feb 18 '18 11:02 falahatiali

Close this issue please, angular 1(js) ≠ angular 2 (typescript)

ripper2hl avatar Mar 13 '18 18:03 ripper2hl