Migrating Angular 1 to Angular 2

0

I am new to Angular 2, I want to migrate this code from Angular 1 to Angular2, could you please give me an idea of how to do it.

    // Forgot Password
$scope.passwordDialog = function($event) {
  prompty({
    title: 'Password Recovery',
    label: 'Enter your email address',
    type: 'email',
    submitText: 'Send',
    required: true,
    event: $event
  })
    .then(function(email) {
      return superlogin.forgotPassword(email);
    })
    .then(function() {
      toasty('Check your email!');
    }, function(err) {
      if(err) {
        console.error(err);
        toasty(err.error);
      }
    });
};
    
asked by Andres Felipe Ceballos Martine 22.03.2018 в 22:15
source

1 answer

-1

Angular 2 o Simply Angular has nothing to do with Angular JS , I recommend that you research or look for a tutorial about Angular and Typescript.

And as an answer to the question you could install SWAL2 this component contains many of the features you need.

    
answered by 11.05.2018 в 01:34