Recently I had a weird problem that Recaptcha has not rendered at all in most of the cases. It seemed random however, but most of the cases it failed. Later I’ve figured out, that it was caused by some network race conditions. The solution was then quite straightforwad: manual initialization of ReCaptcha after the script has …
Tag Archives: AngularJS
ES6 generators and Co.js explained
This is a very good explanatory talk. I wish I have seen it earlier, it could have saved me few restless evenings 🙂
Angular directive for disabled options in select
I’ve written directive which disables options in select rendered via ng-options. It is inspired by discussion in StackOverflow, rewritten to Typescript and I’ve fixed bug with empty options. See the demo below. Up-to-date code is on our company GitHub
Angular directive for formatting numeric input fields
I’ve created AngularJs directive which automatically formats numbers in input fields according to current $locale. Demo is here The code is freely available on ST-Software’s Github account. Feel free to try it, comment or fork.
AngularJs Performance
Some articles and discussions to read regarding performance of Angular apps Optimizing AngularJS: 1200ms to 35ms http://blog.scalyr.com/2013/10/31/angularjs-1200ms-to-35ms/ Bind-once directive https://github.com/Pasvaz/bindonce Expression Namespaces https://github.com/angular/angular.js/issues/6354 (read also the discussion below the readme)
How to call any function as a $filter in AngularJs
Recently I had this little trouble. I had a simple angular controller, which filtered some array of items. I did not want to define the filter in a “global space” because I knew it will be used only by this one controller. So this first thing was to define the custom filter function. Like this …
Continue reading “How to call any function as a $filter in AngularJs”
How to unit test Angular’s $resource and $http
Unit testing of Angular’s underlying $http can be very tricky. I’ve some spent considerable time to get the unit testing up and running. What was running OK in a live application, was not working at all in a unit test. I was getting error message “No pending request to flush !” all the time. My …
Continue reading “How to unit test Angular’s $resource and $http”
Jak jsem si zamiloval TDD
Jako asi každý vývojář, jsem i já četl o tom, jak je důležité psát unit testy. Občas jsem nějaké psal, ale nebylo to dostatečné. Na posledním projektu, kde vývoj trval zhruba rok a půl, jsem začal unit testy psát až během posledních několika měsíců. Což bylo sice ostudně pozdě, ale lepší než nic. (Jednalo se …
Function string.format ported from .NET to AngularJS
Have your ever wondered if there something like string.format() method as known in .NET but available in Javascript? And waht about AngularJS? The answer is yes. Guys from Microsoft wrote library Ajax Control Toolkit, containing little this gem String.js (I found it via Stackoverflow). I needed it as a filter in AngularJS, so I have ported …
Continue reading “Function string.format ported from .NET to AngularJS”