I am zode64. I like programming

Ear I have ears
Thoughts I have a brain
Hand I have hands
Who I am

My name is John. I like making web and mobile things

A recent thought

I find the lifecycle of angular services to be quite anti-intuitive when down in the weeds with lazy loaded modules.

If I have a service declared in a lazy loaded child module and that module is loaded the service is instantiated and according to the documentation and pretty much everyone who has wrote on the subject should live for as long as the associated injector (and thus module) lives unlike a module directly imported which I understand shares the injector and thus the services will be available app wide for the lifecycle of the entire app.

I have found that if a lazy loaded module accessed through a router outlet is navigated to from the same lazy loaded module through a different router outlet which effectively wipes the previous base component of the module, the component is redrawn but the service from the previous module and assumably the actual module itself sticks around. The question then is for how long?

Why zode64

      
function zode64() {
    // Euclidean distance from origin to my home village coordinates
    var euc = Math.sqrt(Math.pow(53.8192, 2) + Math.pow(1.2545, 2));
    // Base 64 encoded ASCII string of euclidean distance
    var eucEncod = btoa(euc);
    // eucEncod == 'NTMuODMzODE4OTE0MjI5'
    var eucEncodSub = eucEncod.substring(7, 11).toLowerCase();
    // eucEncodSub == 'zode'
    return eucEncodSub + '64'; // append base encoding value
}
// zode64() == 'zode64'
console.log(zode64());
      
    

How to contact me

I like email - john@zode64.com. Feel free to ask me anything.