quite a nice illustration from ng ofdoc

quite a nice illustration from ng ofdoc

It not very obvious where to find crashes logs in Chrome. First thing that you need to do is make sure that you have logging option ON, you should have check on this option in Chrome setting:

Then you can go to
chrome://crashes
Taken from stackoverflow, thanks Mahai.
It’s more than annoying to have just a blank page and no errors in console when your issue is inside ui-router resolve. Finally I found a pretty nice solution, don’t know why it’s not provided “from the box”. In case of error ui-router sends specific event $stateChangeError that we could listen for:
[javascript]
$rootScope.$on(‘$stateChangeError’, function(event, toState, toParams, fromState, fromParams, error){
console.error(error);
});
[/javascript]
and now wow! we have an exact error in console and no need to guess what’s wrong with your code anymore.

Nginx Syntax Highlighting Plugin from Brandon Wamboldt. Don’t know why it’s not yet native for sublime.
Учтите что ng-disable работает только на элементах формы, поэтому тут
[html]
<div ng-click="doAction()" ng-disabled="buttonDisable">Click Me</div>
[/html]
директива ng-click отрабатывает клик.
Если необходимо использовать ng-disable могу предложить такой вот хак:
[html]
<div ng-click="buttonDisable || doAction()" ng-disabled="buttonDisable</div>
[/html]
P.S.: Большоя спасибо Vitalii Hudyma за планкер с кодом.

I’ve already made some notes about ideal company(ru), now after one year I decided to review the points and made new list.
Something really weird is going with my Android phone: from time to time it opens me browser with this link. By domain whatsappupgradeservice.com I immediately realised that it’s fake.


Пост состоит из следующих частей:
I found it quite strange that AngularJS does not have possibility to watch several Angular-events, i.e.:
[javascript]
$scope.$on([‘user.login’, ‘user.logout’], callback);
[/javascript]
and I decided to extend $on method, to make it handle such case:
[javascript]
var $onOrigin = $rootScope.$on;
$rootScope.$on = function(names, listener) {
var self = this;
if (!angular.isArray(names)) {
names = [names];
}
names.forEach(function(name) {
$onOrigin.call(self, name, listener);
});
};
[/javascript]
Sandbox for this code you can find here.