It’s pretty straightforward but not very clear in the documentation, so how do you pass-in arguments in a callback in an Angular component? In your Angular component you have to bind your callback with ‘&’ and return an object with the passed-in name as key: Angular-component.html <my-component callback=”$ctrl.callback(keyName)”></my-component> Angular-template.html <button ng-click=”$ctrl.save({‘foo’:’bar’})”>Pass object to callback</button> Angular-component-and-controller.js […]
Category: Frontend

Help CSS position sticky doesn’t work [SOLVED]
Position sticky isn’t a new thing, but the support is now so great that I started to use it, so what’s position sticky? Sticky positioning is a hybrid of relative and fixed positioning. The element is treated as relative positioned until it crosses a specified threshold, at which point it is treated as fixed positioned. […]

Prebrowsing: Boost performance of your site with resource hints
A couple of days months ago Vitali Fridman showed some of the performance improvements they have made on smashingmagazine.com. One enhancement was adding a prerender resource hint (also called a browser hint). The prerender resource hint or resource hints in general are not something new. They have been around for several years but I have never used or been […]