zoukankan      html  css  js  c++  java
  • angularjs开发常见问题-1(持续更新中...)

    angularJs中学习中…
    1.刷新当前页面数据:$state.reload

    service.create(data).then(function (newItem) {
      flash.success = 'Successfully created something';
      service.fetchAll(var force = true).then(function (services) {
        $scope.services = services;
        $state.reload();
      });
    });

    2.新增保存之后,停留在刷新当前页面,而且清空数据:$state.go(‘.’, {}, { reload: true });

     WithdrawalsService.Create({
                        withdrawals: $scope.userList,
                        valueKeyList: $scope.arrayValueKey
                    }).$promise.then(function (events) {
                                msgBoxUtils.bigBox(events);
                                //清空数据,刷新页面
                                $state.go('.', {}, { reload: true });
                                //保存成功,而且打印
                                Print(events); 
                        }, function (error) {
                            msgBoxUtils.bigBox(error);
                        });

    3.延迟刷新当前页面:$timeout

    service.create(data).then(function (newItem) {
      flash.success = 'Successfully created something';
      service.fetchAll(var force = true)
        .then(function (services) {
          $scope.services = services;
        }).then(function () {
          return $timeout(function () {
            $state.go('.', {}, { reload: true });
          }, 100);
        });
    });
  • 相关阅读:
    数据库连接池
    一致性hash
    java 集合大家族
    linkedlist
    HashMap
    hashcode
    Job 逻辑执行图
    CDN
    网站缓存
    Mysql临时文件目录控制
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/5322399.html
Copyright © 2011-2022 走看看