Skip to main content

Posts

Create GUID From Your Front End.

The Problem Statement GUID is synonym with .Net platforms, Instantiating it from the normal C# syntax in .Net environment is relatively easy, but instantiating it at the front end using Typescript/Javascript is somehow quite tricky, Assuming that we have a frontend logging/crashreport mechanism that is reporting directly to our data store, and to differentiate each logging/crashreport, we have standardized it to use GUID. We are how required to create a GUID generator before assigning its value alongside with our logging/CrashReport. The Code Snippet From the code above, We are making use of Math.Random functions to perform such actions, Note this is totally different from GUID generation using .Net Framework ( where it involves more algorithm to generate one ) But, somehow it will generate something similar to one, The Consideration Based on StackOverflow, The code snipped does not follow the RFC4122 compliance in generating an UUID. To meet the Compliance we might need to

Directives - Understanding it

Directives push HTML syntax to another level by allowing user to create custom elements and attributes. These custom elements and attributes allow user to create an abstract user components that is usable throughout the application. There are many way to take advantage of Angular Custom Directives based on client requirements. Although we may consume the built-in directives that came out of the box by Angular. There will be at some situation that we might need to customize our directives. Let's cut to the chase and jump on how to create a simple Custom Directive The Code From the code above we started by 1. Create the directive component We start by creating the directive component function by passing some parameter as an arguments ( In this case it is $location, $modal, $routeParams ) It will then return our custom directive, the custom directive is consists of templateUrl, restrict, scope, link and many other properties. Notice templateUrl is a string where we pl