search

Home  >  Q&A  >  body text

angular.js - angularjs $scope.$parent issue

How to use the scope in a controller in a controller in a modal, how to pass it there, I studied $scope.$parent, but I still don’t understand how to do it
大家讲道理大家讲道理2864 days ago625

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-15 17:03:38

    If you use the UI Bootstrap modal, there is a scope parameter, just pass the $scope of the controller directly:

    scope (Type: $scope) - The parent scope instance to be used for the
    modal's content. Defaults to $rootScope.

    reply
    0
  • Cancelreply