I have a button on my page with an id="viewQuestions" on a page:      <body ng-keydown="key($event);">   My code is checking for key hits like this:      $scope.key = function ($event) {         $scope.$broadcast('key',...
Edit: It seems that this could be related to Chrome v43, I downgraded to v42 and everything works fine.  Edit: I've submitted an issue on the Angular's Github repo.  It seems that the error gets thrown by  return logFn.apply(console, args); l...
If one changes a scope property first, and then broadcasts an event second, will the corresponding watcher callback and event listeners callback always be executed in that same order? For example:  $scope.foo = 3; $scope.$broadcast('bar');...
I have a mean-stack website. I want to use ExecuteFunction to bind a button to launch this website in a Dialog box:  function doSomethingAndShowDialog(event) {     clickEvent = event;     Office.context.ui.displayDialogAsync("https://localhost:30...
My task is to process the dropped text using angular. I keep getting this error $scope is not defined on drag and drop events. Any idea how to fix this?   I already looked into angular drag and drop libraries. They don't allow drag and drop for s...
tl;dr: The initial question was "How to trigger a callback every digest cycle?" but the underlying question is much more interesting and since this answers both, I went ahead and modified the title. =)  Context: I'm trying to control when...
New to AngularJS (and JavaScript frankly), but from what I've gathered, explicit calls to $scope.$apply() are only needed when changes happen outside of angular's radar. The code below (pasted in from this plunker) makes me think it wouldn...
I'm trying to create a directive which changes ng-model from a parent html tag but it is not working:  var app = angular.module('myApp',[]); app.controller('ParentController',['$scope', function($scope) {   $scope.anyVar =...
AngularJS promises seem to be tied to a digest cycle, as in, the success/error callbacks are not called until a digest cycle is run. This means that anything that uses promises, such as $http or manually created promises, also need to trigger a diges...
I have next code (events is array):  <tr ng-repeat="event in events">     <td>         <span time-ago="{{event.TimestampSec}}"></span>     </td>     <td>         {{prepareAlertValue(event.AlertValue...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.