Skip to content

migrate from angular 1 to 5 #1188

@falahatiali

Description

@falahatiali

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions