О том как установить и запустить Protractor уже было в этом посте – Тестируем AngularJS используя Protractor. А сейчас мы сделаем фокус на том, как мы можем интегрировать Protractor в нашу систему и подкючить к Grunt.
Category Archives: Хочу сделать мир лучше
AngularJS Directive attribute binding options
This example explicitly shows the difference between directive attribute binding types. Let’s say you have directive:
[javascript]
function myDirective() {
return {
scope: {
x: ‘@’, // String, interpolated with {{ }}
y: ‘=’, // Expression
z: ‘&’ // Function
}
};
}
[/javascript]
it means that you will do such operations with attributes to pass the directive:
[javascript]
function MyDirectiveController($scope, $element, $attrs, $interpolate, $parse) {
$attrs.$observe(‘x’, function(value) {});
$interpolate($attrs.x)($scope);
$scope.$eval($attrs.y);
var fn = $parse($attrs.z);
$element.on(‘click’, function() {
fn($scope);
});
}
[/javascript]
Making Jira better
Our team found that it was not so convenient to have avatars for assigned developers only for Plan mode and not for Work (Rapid board of Jira Agile).
I’d create a question about that issue on Atlassian Answers, but unfortunately the answer was “Unfortunately this is not possible due to the way User Stories are displayed in the system.”
I had a thought “why not to tweak it with userscript?” and solution came after:
You are welcome with criticism and suggestions.
New Chrome console features
You could set the focus on element without pointing it via inspector, there is “inspect” method in console now:
one more helper-method in console is “copy” – to stringify and copy to clipboard:
after such operation you will have document.body element converted into string in your clipboard.
Some inspiration for start playing:
[javascript]
inspect(document.body.firstChild)
inspect(document.querySelector(‘div’))
inspect(document.querySelector(‘.ng-scope’))
inspect($1)
copy($0)
copy(document.querySelectorAll(‘div’)[0])
copy(document.cookie)
[/javascript]
Story about AngularJS, IE9 and CORS
Using AngularJS with Restangular we suddenly found that for IE9 we have fatal error “Access denied“. It was CORS issue. We’d tried several solutions but only this xdomain script helped.
remark: it works only for case when “slave”/requested domain is under your control: where you could put “proxy.html” file.
Наследование scope в AngularJS
Думал накидать статью на эту тему, а потом внезапно обнаружил очень хороший материал на angular-wiki и перевод на хабре, ну и обсуждение на стеке.
Что нового в HTML5 и CSS3
Сразу оговорюсь: цель этого поста – упорядочить для себя инфомрацию, которая накопилась с 2009 года. Возможно это будет полезно тому, кто только пытается проникнуться последними веяниями HTML и CSS.
Пишем свой Uploader с нуля на javascript используя FileApi. Часть5. +AngularJS
В этой части хочу рассказать о том, как можно все эти операции с файлами завернуть в AngularJS.
Рекомендую пролистать предыдущие части перед началом разбора этой:
Передача данных между сущностями AngularJS
Один из самых распространенных вопросов по AngularJS – передача данных от одной сущности другой. На самом деле вариантов не так много. Попробуем их все рассмотреть.
FeedTheDevs. For the moral of our developers
Let me introduce you my pet-project FeedTheDevs. It provides easy way to estimate (by voting ) each PullRequest to any github repo. Could be used like developer work evaluation.
Application was created using AngularJS, node.js, PostgreSQL, GitHub API. You can find source code here.
Why “feed”? For got PR you give developer pizza, otherwise you feed him with spoiled tomatoes :)