同步操作将从 影子gaolei/angularJS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
function Ctrl2($scope) {$scope.format = 'M/d/yy h:mm:ss a';}angular.module('time', [])// Register the 'myCurrentTime' directive factory method.// We inject $timeout and dateFilter service since the factory method is DI..directive('myCurrentTime', function ($timeout, dateFilter) {// return the directive link function. (compile function not needed)return function (scope, element, attrs) {var format, // date formattimeoutId; // timeoutId, so that we can cancel the time updates// used to update the UIfunction updateTime() {element.text(dateFilter(new Date(), format));}// watch the expression, and update the UI on change.scope.$watch(attrs.myCurrentTime, function (value) {format = value;updateTime();});// schedule update in one secondfunction updateLater() {// save the timeoutId for cancelingtimeoutId = $timeout(function () {updateTime(); // update DOMupdateLater(); // schedule another update}, 1000);}// listen on DOM destroy (removal) event, and cancel the next UI update// to prevent updating time ofter the DOM element was removed.element.bind('$destroy', function () {$timeout.cancel(timeoutId);});updateLater(); // kick off the UI update process.}});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。