Or perhaps it should be called “How to get rid of the $parent.$parent.$parent...$parent
s in your code”, or “How do components talk to one another”.
There are a couple of ways to deal with it.
Continue reading
Or perhaps it should be called “How to get rid of the $parent.$parent.$parent...$parent
s in your code”, or “How do components talk to one another”.
There are a couple of ways to deal with it.
Continue reading
When we have $ctrl
created by $componentController
, how to mock static members of a class?
let $ctrl = $componentController("funny-component", null);
Angular testing can be confusing. To make it less confusing, lets talk about a major part: $componentController
.
We don’t actually need $sanitize
to sanitize strings.
ng-bind
automatically implements sanitizing in the background with textContent
. However, sometimes we need to pass string in as template in controllers and services, or pass it in as the exact content of “name
” attribute of an input, then $sanitize
doesn’t work anymore.
Error:
Module parse failed: <...> You may need an appropriate loader to handle this file type.
To turn a custom component of an input element into a ng-model
/validation enabled one, and to be able to use NgModelController
and all its fancy methods in its controller:
Use fdescribe
and fit
in places of describe
and it
.
You’d get the Unknown Provider error if you’re publishing compressed CoffeeScript. It usually goes like this:
Error: [$injector:unpr] Unknown provider...
Find max_line_length
in your coffeelint.json
file:
Error trigger: it’s a known feature of Chrome 10, if required
is present in input [1].