This post demonstrates how to convert a JavaScript function to string and using the same string to declare and execute a method dynamically.
Access environment variable in Node.js
This short post shows how to access environment variables in Node.js.
PhoneGap – HelloWorld Example via PhoneGap CLI
This post demonstrates how to create a very simple example of PhoneGap application via PhoneGap CLI.
Dropdowns in UI Grid
[wp_ad_camp_1] Using dropdowns in UI-Grid is two-fold. One, you define a filter that displays the labels of HTML’s SELECT values when the dropdown is not on focus or edit mode. The following Department labels are displayed using a filter. Second,
Pass data to Controller from another controller using $mdDialog
[wp_ad_camp_1] There are a couple of ways to do this.One is via $rootScope by creating (maybe temporarily) a public member variable and let the dialog controller read from it. This is also similar to creating a service with public member
How to create classes in JavaScript
Background [wp_ad_camp_1] I must admit I used to dislike JavaScript and UI development. First, I related JavaScript to Web UI design at which I am very not good at. I do not have an artistic side when it comes to
How to adjust table headers in Angular-Datatables
This highlights how to programmatically adjust table headers after rendering angular-datatables. Note that sometimes before adjusting the headers so that they will aligned with the table body (
), a delay (via setTimeout()) is needed as the adjustment may be interrupted or prevented by any of the tables’ parent elements.Check if a value is in an Array in JavaScript
Given an array of strings, we want to know if a particular string value is in that array. Here we’ll use the Array object’s .indexOf function.
JavaScript scope in functions vs Java scope in methods
For years, JavaScript to me was a mere validation tool or script for web applications. I hated it. I avoided using it. This time JavaScript gets the same respect from me as Java does. If you plan to “own” (or master if you can) JavaScript and you are coming from blocked-scoped languages like Java, C#, C and C++, this is one of key things you need to keep in mind…
Working with Reference Types in JavaScript
JavaScript has both primitive and reference types. It has three primitive types: string, numeric, and boolean. Internally, these are small and fixed-sized collection of bytes that are easily and predictably manipulated at the low (primitive) levels of the JavaScript interpreter. Example of strings are ‘This is a string’ and “This is another string”. Numeric values – 1, and 3.1416. Boolean values – true or false. On the other hand, reference types are different. They include objects (including JS built-in objects), Arrays, and functions. Essentially, they can have any number of properties or elements with various types (both primitives and references), so they cannot be manipulated as easily as fixed-size primitive v