Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate from angular 1 to 5 #1188

Open
falahatiali opened this issue Feb 18, 2018 · 1 comment
Open

migrate from angular 1 to 5 #1188

falahatiali opened this issue Feb 18, 2018 · 1 comment

Comments

@falahatiali
Copy link

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);
   }
 });
@ripper2hl
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants