code

Ionic 2 components (Part 1)

Let's learn some of the useful components in ionic 2. "Action sheet" - Action sheets are nothing but a dialog in which the user can choose from a set of options. It is normally shown as a popup above the page. This action sheet contains an array of buttons with properties such as

Sample Code:

Creating a simple search page in Ionic 2 application

An ionic search bar can be created to bind to a model so that when ever there is any change in that element will emit an input change. (ionInput) attribute callback will be triggered. In this below example we are going to create a search page to list a list of topics that can be filtered using search bar

Add below code in .html file

Drupal Coding Standards - do and don't

In each and every language there is a need of following coding standards. The Coding standard will differ based on each language. This article will demonstrate the coding standard we should following for Drupal Content Management System(CMS). This article compares coding standards for both Drupal 7 and Drupal 8 with some demos. Also, it will support the best approach to hack the Drupal Core and Contrib modules.

A brief introduction on AngularJS

AngularJS is a JavaScript MVC framework developed by Google that lets you build well structured, easily testable, and maintainable front-end applications. If you haven’t tried AngularJS yet, you’re missing out. The framework consists of a tightly integrated toolset that will help you build well structured, rich client-side applications in a modular fashion—with less code and more flexibility.
AngularJS extends HTML by providing directives that add functionality to your markup and allow you to create powerful dynamic templates. You can also create your own directives, crafting reusable components that fill your needs and abstracting away all the DOM manipulation logic.

AngularJS is a JavaScript MVC framework developed by Google that lets you build well structured, easily testable, and maintainable front-end applications. If you haven’t tried AngularJS yet, you’re missing out. The framework consists of a tightly integrated toolset that will help you build well structured, rich client-side applications in a modular fashion—with less code and more flexibility.
AngularJS extends HTML by providing directives that add functionality to your markup and allow you to create powerful dynamic templates. You can also create your own directives, crafting reusable components that fill your needs and abstracting away all the DOM manipulation logic.

Storage in Ionic 2

Storage in ionic 2 can be used to store data key/value pairs. We can also store JSON Objects. This Storage can work using may storage engines, here it will choose the best based on the platform. If the application runs in native platfrom it will use SQLite where as if it is in browser it use IndexedDB. Follow the steps to use Storage,

Drupal: Show Erros on Developing or WSOD

In Drupal while developing it not showing the errors instead of it will be showing us a White screen. This screen is known as White Screen Of Death(WSOD). During development, we need to debug the errors, for this purpose we want to show errors. To show errors instead or white screen we need to add below lines in "settings.php".

Angular directive to check the scroll position of an element with Example and Demo

Angular Directives are markers on a DOM element which attach a special behavior to it. Here in this example the directive "onScroll" listens to a scroll event. The scroll position from the element is found using scrollTop.

Find Device Network enable and disable status in ionic - cordova app

In Ionic application the event “offline” and “online” can be added using addEventListener(). These events are attached to the document. The following are the sample codes, the respective callbacks will get fired once the device data connection enabled or disabled.

Adding a dynamic generated CSS(Cascading Style Sheet) to the AngularJS view with example.

A dynamic generated CSS (Cascading Style Sheet) at the controller can be bind to the HTML View using ng-bind-html attribute with in the style tag. This example uses angular-sanitize.js which removes the dangerous token from the dynamically generated style string. It uses the ng-keyup AngularJS HTML attribute to update the background colour value on KeyUp event. The values inside the text-box taken as the background colour value.