$scope destroy 時要 cancel,因為不會自動取消呼叫,若固定周期呼叫則會持續呼叫
$scope.timer = $timeout($scope.onTimeout, 10000);
$scope.$on(
"$destroy",
function (event) {
$timeout.cancel($scope.timer);
}
);
使用 CreateProxy 建立物件,不要直接 new var newmodel = _contextXXX.CreateProxy<yyy>(); ... _contextXXX.yyy.Add(newmodel); await _contextXXX.SaveC...