Calculate Base64 Image Size

In this articles, we will get exact length Base64 photo from ionic native Camera|Gallery in Kilobytes. Base64 encodes three bytes to four characters. Sometimes, padding is added in the form of one or two ‘=’ characters. To get the length of bytes we use the formula: Step 1: Create and add an ionic native-camera plugin … Continue reading “Calculate Base64 Image Size”

Ionic Cordova ActionSheet

The ActionSheet plugin shows a dialog containing a native list of options the user can choose from. Requires Cordova plugin: Cordova-plugin-actionsheet. We can add ActionSheet from ionic native plugin and ActionSheet from a controller. It appears on top of the app’s content and must be manually dismissed by the user before they can resume interaction … Continue reading “Ionic Cordova ActionSheet”

The ng-template directive and ngIf

The ng-template directive allows us to run a set of HTML tag block based on ngIf|else condition. TemplateRef is the class name and <ng-template> is the html tag — they are both referencing the same thing. We can use <ng-template> with ngFor, ngIf and ngSwitch. Using TemplateRef and ViewContainerRef we can reuse the code of <ng-template> … Continue reading “The ng-template directive and ngIf”

Shaping Up With AngularJS – Codeschool

app.angular(“sample” []); Note : Without [] refer to previous existing module and with [] indicate it creating new module. Tab: Adding new Controller app.js   Example 2: Adding Review to the form Displaying the reviews for all product   CREATING CUSTOM DIRECTIVE ELEMENT ===================================   CREATING CUSTOM DIRECTIVE ATTRIBUTE ====================================   Creating custom directive with … Continue reading “Shaping Up With AngularJS – Codeschool”

Js Code to detect Mobile Device

Javascript code to determin mobile device Javascript code to determine data Saver on|off in browser. Javascript code to determine chrome browser or not Javascript code to determine chrome version  


In previous example we already had access to database and user model which allow us to use user model globally as model to create user login. To create authentication in Slim, we have to create authentication controller, View and create a form where user can sign up with account and last we have to insert … Continue reading “Authentication”

Model – How Does Eloquent Work?

The Eloquent ORM provides an ActiveRecord implementation to work with your database. This means that each model you create in your MVC structure corresponds to a table in your database. Models are mostly used to interact with the database using Eloquent ORM. Note that we did not tell Eloquent which table to use for our … Continue reading “Model – How Does Eloquent Work?”

Eloquent with Slim

We can use a database ORM such as Eloquent to connect your SlimPHP application to a database. We need to setup the databse and Model in best possible way. We are using Lavravel Eloquent ORM which provides a beautiful, simple ActiveRecord implementation for working with your database. We can use Eloquent outside of Lavravel and … Continue reading “Eloquent with Slim”

Basic Git commands

Check if Git has already been installed, Git is usually preinstalled on Mac and Linux. git –version Type the following command and then press enter: Tell Git who you are First, you need to tell Git who you are: git config –global “” git config –global “Your Name” Some basic Git operations When … Continue reading “Basic Git commands”

Bootstrap in Slim

In a Slim 3 application, we can use Twig template engine, to easily create a standard page template, or layout. We will create a few site pages (home, about, contact). In this articles we will learn how to add bootstrap front end framework in slim and create a base layout app.twig that can be use … Continue reading “Bootstrap in Slim”