watch

sass watching multiple directories

会有一股神秘感。 提交于 2019-11-27 12:18:25
问题 What is the right way in sass to watch multiple directories from a shell script? I have following in a shell script: sass --style compressed --watch branches/mysite/assets/css/sass:branches/mysite/assets/css & sass --style compressed --watch branches/mysite2/themes/css/sass:branches/mysite2/themes/css & sass --style compressed --watch trunk/assets/css/sass:trunk/assets/css However, this creates 3 processes and when I hit Ctrl+C to stop, not all processes are exited. How do I get sass to watch

AngularJS $watch window resize inside directive

[亡魂溺海] 提交于 2019-11-27 11:39:10
I have revealing module pattern which looks like this: 'use strict'; angular.module('app', []) .directive('myDirective', ['SomeDep', function (SomeDep) { var linker = function (scope, element, attr) { // some work }; return { link: linker, restrict: 'E' }; }]) ; What I'm having trouble with is integrating a $watch into this. Specifically watching for window resize, with the '$window' service. [EDIT]: I realised what my issue was this whole time... I was restricting to element, when I forgot that I was implementing it as an attribute... @_@; You shouldn't need a $watch. Just bind to resize

how to watch changes in whole directory/folder containing many sass files

孤街醉人 提交于 2019-11-27 10:54:51
How could I trace changes in whole directory containing many sass files ? I'm using the following command to watch changes in sass file: sass --watch style.scss:style.css But how to watch changes in whole directory/folder containing many sass files. Simply use the command sass --watch <input folder>:<output folder> , like this: $ ls -l css/ sass/ $ sass --watch sass:css Where <input folder> contains the Sass files and <output folder> that hosts the generated CSS files. Expanding the answer by piouPiouM a little: Output files will be created with the same names as input files except ending with

Where is the expression window in Xcode 4?

让人想犯罪 __ 提交于 2019-11-27 10:27:25
问题 How can I add an expression to watch in Xcode 4? This should be very obvious, but it is not. It does not seem to be down any menu or available on a contextual click. It would be nice if I could highlight a variable or expression and then "Add to watch" or "Add expression". 回答1: I don't know that there is an option to create a watch expression directly from Xcode 4's code window. If there's something in the code window you'll want to add an expression watch for, I think you'll have to copy

AngularJS : $scope.$watch is not updating value fetched from $resource on custom directive

…衆ロ難τιáo~ 提交于 2019-11-27 10:21:19
问题 I'm having an issue with custom directives that's driving me crazy. I'm trying to create the following custom (attribute) directive: angular.module('componentes', []) .directive("seatMap", function (){ return { restrict: 'A', link: function(scope, element, attrs, controller){ function updateSeatInfo(scope, element){ var txt = ""; for (var i in scope.seats) txt = txt + scope.seats[i].id + " "; $(element).text("seat ids: "+txt); } /* // This is working, but it's kind of dirty... $timeout

How to watch for ng-model created with ng-bind-html

旧城冷巷雨未停 提交于 2019-11-27 06:05:25
问题 I need some help with an ng-model created with ng-bind-html. I have a JSON file in the server in which I have some html and some inputs like this: *.json { "test": { "1": { "question":"<span>1. something:</span>", "options":"<input type='radio' name='q1' ng-model='q.1' value='a'>a) op 1<br><input type='radio' name='q1' ng-model='q.1' value='b'>b) op 2<br><input type='radio' name='q1' ng-model='q.1' value='c'>c) op 3<br><input type='radio' name='q1' ng-model='q.1' value='d'>d) op 4<br><input

Watching variables in SSIS during debug

♀尐吖头ヾ 提交于 2019-11-27 05:23:48
问题 I have a project in SSIS and I've added an Execute SQL Task which sends its result out to a variable. I wanted to confirm the value because I was worried that it would try to write it out as a resultset object rather than an actual integer (in this case I'm returning a COUNT). My first thought was just to run it in debug mode and add the global variable to my Watch window. Unfortunately, when I right-click on the Watch window, the option to "Add Variable" is greyed out. What am I missing here

AngularJS watch array of objects for data change

☆樱花仙子☆ 提交于 2019-11-27 04:11:33
I'm implementing a shopping cart and want to store the data in localStorage. I want to watch the variable $scope.cart for change so that I can update the localStorage The cart variable looks like this: [{'name':'foo', 'id':'bar', 'amount': 1 },...] This is the code for the watch. $scope.updateCart = function(){ localStorageService.add('cart',JSON.stringify($scope.cart)); alert('cart updated'); }; $scope.$watch($scope.cart, $scope.updateCart(), true); This is the HTML where the user changes the model. <li ng-repeat="item in cart"> {{item.name}} <input type="text" ng-model="item.amount"> </li>

AngularJS $watch window resize inside directive

▼魔方 西西 提交于 2019-11-27 04:03:26
问题 I have revealing module pattern which looks like this: 'use strict'; angular.module('app', []) .directive('myDirective', ['SomeDep', function (SomeDep) { var linker = function (scope, element, attr) { // some work }; return { link: linker, restrict: 'E' }; }]) ; What I'm having trouble with is integrating a $watch into this. Specifically watching for window resize, with the '$window' service. [EDIT]: I realised what my issue was this whole time... I was restricting to element, when I forgot

AngularJS : Clear $watch

折月煮酒 提交于 2019-11-26 23:32:14
I have a watch function in my AngularJS application. $scope.$watch('quartzCrystal', function () { ... } However, after some condition (in my example, changing the page at my single-page application ) I want to stop that watch (as like clearing timeout). How can I do that? Umur Kontacı $watch returns a deregistration function. Calling it would deregister the $watcher . var listener = $scope.$watch("quartz", function () {}); // ... listener(); // Would clear the watch scope.$watch returns a function that you can call and that will unregister the watch. Something like: var unbindWatch = $scope.