Add AngularJS controller dynamically
31 Jul 2016Let me show you how to add angular controller dynamically: after application has bootstrapped. It is useful for example when you are loading components dynamically.
Read more ...Let me show you how to add angular controller dynamically: after application has bootstrapped. It is useful for example when you are loading components dynamically.
Read more ...I think that an arrow functions are one of the best features of ECMAScript 6, excluding class
-es and OOP programming at all.
It has really very helpful and useful syntax for scripting language. So let’s check it out:
Read more ...Yesterday at work, I’ve received a task, which I should had done today (and I actually did).
Simple task to filter table by logical value in one column.
So I had 3 values to filter by: null
, true
and false
(not filtered, published, unpublished).
I’ve thought what would be the best visual solution for that…
I knew, that I don’t want to create three-option select
, like that:
(what is actually the fastest solution of that issue) .
But I’ve decided to make three-state checkbox. I wanted it to be clean and semantic solution, so I’ve also decided to create open-source package with AngularJS directory of three-state-checkbox.
Read more ...Image above clearly shows how does scope is nesting in JavaScript.
In JavaScript ECMAScript 5 every scope it is a scope of function. Blocks, like if{}else{}
, are not creating their own scope.
If you want to make your function block-scoped in ES5 you’ll have to nest it to another function.
But in ECMAScript 6 you have better solution!
let
has the same block scoping as const
, but let us look over Block Scoped Variables in ECMAScript 6