For people who use Angular, calling $timeout(fn)
without a second parameter is a very familiar way of deferring execution.
But what about in plain JavaScript?
For people who use Angular, calling $timeout(fn)
without a second parameter is a very familiar way of deferring execution.
But what about in plain JavaScript?
Angular testing can be confusing. To make it less confusing, lets talk about a major part: $componentController
.
Sometimes when we pull from upstream origin in terminal, we see git prompting to enter vim. And if we left it hanging there and went ahead committing somewhere else, it would treat all those changes in master as your own contribution, because merge didn’t happen before commit.
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.
After I accidentally stumbled upon the solution to “preventing body scrolling when overlay is on” by trying too many different things again and again, I wasn’t able to explain exactly why this works.
If you @import a lot of scss/sass/css files, the style loader can take a looong time to finish loading. How to improve? Lets take a look at what each of them does: