In Aurelia we already have the power to iterate arrays from within our views and for most purposes, this is fine. However, sometimes there are situations where we might want to iterate an object’s properties or values without needing to normalise it into an array.
In the Aurelia Gitter chat, this question came up, so I decided to create a couple of custom ValueConverters to help with iterating Objects like they were arrays. Other than including the Value Converters themselves, you don’t need to change anything else.
Before Aurelia came onto the scene I had worked extensively with Angular and then shortly thereafter, React.js (sometimes both together). After using React for a while, I became accustomed to passing functions as callbacks to my components. So naturally when I started using Aurelia and creating custom elements, I tried the callback function approach first.
Callbacks are not the answer While I was successful in creating a bindable property on my initial custom elements and then passing a function, it became apparent this approach is flawed. Not only do you have scope issues to deal with, but I encountered issues with singletons not being singletons and struggling to pass exact references.
I know, I just can’t keep quiet about Aurelia. But it is one of the most exciting things to happen to Javascript in a long time. So I decided to write up a quick tutorial on creating a custom element in Aurelia for Select 2, which is a popular library for adding custom select elements to your applications.
Prep Before we begin, you need to have Aurelia installed locally and the development server running. The easiest way to do this is to download the Aurelia Skeleton Navigation project and follow the README instructions. This tutorial assumes you already have an Aurelia project and that you’re not starting from scratch.
Recently whilst working on my day-job project I needed to get a HTMLElement from the DOM and then store it as a string. Using innerHTML obviously didn’t make sense because it would only get the inner contents, not the outer. I wanted the whole element.
The logical choice was the lesser known property outerHTML. I say lesser-known because you don’t really see it used all too much, in face of innerHTML anyway. It isn’t the fact developers don’t know about it, it just doesn’t get used a whole lot.
If you’re a user of Aurelia and you’re writing unit tests, you might have run into some confusion around testing your custom elements, more specifically how you can mock an injected instance of something into a class.
In my case I had a Custom Element which allows me to display a select2 custom select within my application. I was also injecting the Element itself and EventAggregator onto the class using the @inject class decorator.
When it comes to working with your servers (or any remote machine for that matter), public key encryption is a must. The basics are: you register a public key on the server-side and then use your private key to authenticate with the remote machine.
So you’ve generated a new SSH keypair or you have your existing SSH keys in the form of id_rsa or whatever. Now you want to push them to your remote server so you can use your private key to login?
How many of your friends and family come over and want to use your wifi? For me, It would take me a while to count all of the people who I have given access to my wifi connection. Usually I just give them the password when they come over or type it in for them without thinking twice.
Of all of the people who have used my wifi connection, they all have the details saved so they can connect later without asking for the password again. This is why I like the Wifi Sense feature in Windows 10 because it mitigates the need to share my wifi password with anyone.
Lets be honest. There are developers who love all of the additional styling for forms, typography and widgets that come with Bootstrap and there are those who absolutely despise everything Bootstrap has and stands for, with exception (for most) the great grid system.
Recently I wanted to use the Bootstrap grid system but without having to use Bootstrap itself. While Bootstrap does offer the ability to customise your download, if you are like me and you use JSPM or Bower for managing stuff like this or you use Git sub-modules, then including just a stylesheet file into your project isn’t the most ideal approach.
Geronimo Jerky is a small Brisbane based company that produce beef jerky. At the helm is The Big Chief aka Mark Hoyle, who moved to Australia from the USA 20 years ago, bringing with him an authentic native American family recipe for jerky.
Their slogan is, “The best beef jerky you’ve ever tasted” it is a pretty big claim to make, so does Geronimo’s jerky live up to the claim?
If you are currently working with the Aurelia Javascript framework, then you would know that every so often given the not-so-beta nature of the framework, a new update comes out for one or more of the framework components.
This article is specifically for Jspm users, updating dependencies in Webpack and RequireJS applications uses Npm instead of Jspm.
If you’re not staying up-to-date for each update, it is possible to fall behind. While you might assume that jspm update would work. Sometimes if you’re updating an older code-base, the newer code can and possibly will break your application using update.