Suddenly found out that Chrome has possibility to “edit breakpoint” or other words – to add extra behaviour for it: like stop only for special condition, output console.log, etc.
JavaScript for detecting browser language preference
Just not to forget:
[javascript]
var language = window.navigator.userLanguage || window.navigator.languages[0];
[/javascript]
and more crazy(but more trustful) way:
[javascript]
$.ajax({
url: "http://ajaxhttpheaders.appspot.com",
dataType: ‘jsonp’,
success: function(headers) {
var language = headers[‘Accept-Language’];
}
});
[/javascript]
Blackbox JavaScript Source Files
Probably you already know that Chrome now allows to put script source file to blackbox (or simply to ignore it during debug). It helps to avoid jumping inside 3rd party library and debugging it instead of focusing on own code.
htaccess to nginx converter
Everything that you need is already in internet. I made sure about it one more time when found this service – htaccess to nginx converter – it was really helpful for rewriting rules.
Regulex – сервис визуализации регулярных выражений
Regulex – интересный сервис по регуляркам, который может пригодиться при изучении материала, а так же при разборе каких-то сложных конструкций.
Самые распространенные ошибки AngularJS разработчиков
Пост представляет собой микс перевода/переработки статьи The Top 10 Mistakes AngularJS Developers Make и личного грабельного опыта.
Continue reading
Angular.im
AngularJS UA группа переехала из skype в gitter, и теперь может быть найдена по следующему адресу – angular.im.
Автоматизируем тестирование AngularJS с Protractor
О том как установить и запустить Protractor уже было в этом посте – Тестируем AngularJS используя Protractor. А сейчас мы сделаем фокус на том, как мы можем интегрировать Protractor в нашу систему и подкючить к Grunt.
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]
@AngularAir
Would like to share link to site with AngularJS podcast announcements that named as Angular Air. Second podcast is coming…