1.使用$watch进行表单监测:

  $scope.$watch("fromName.$dirty", function (newValue) {
                $state.params.isDirty = newValue;
            });

2.表单提交成功后进行复位dirty:

  $scope.formName.$setPristine();
  $state.params.isDirty = false;

 

相关文章:

  • 2021-06-22
  • 2021-09-15
  • 2021-06-18
  • 2021-06-25
  • 2021-09-13
  • 2022-12-23
  • 2022-02-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案