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
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
The primary goal of this session is to give people a solid basis in the most common security issues so they can quickly identify those security issues. From there, we'll move into some other common pain-points of site builders like frequently made mistakes, modules to enhance security, and evaluating contributed module quality.
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.
In Drupal theme, each theme has a logo image files. We can use this logo images what ever we need. The below example will help us to print current theme logo as well as any theme logo.
Regular expression are nothing but patterns which are matched with the given piece of text. Here is a sample implementation to convert a given text into a link..
The below example implements a search in which the search string is compared with the array. It uses indexOf method to compare the search string with the items. The attribute ng-repeat is used to print the list of items in the li tag.
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.
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.
A number of items can be printed in HTML as per the iteration counts using “ng-repeat” in AngularJS. The iteration count is the size of the array or object. The item can be printed in the reverse order using “orderBy”.
Filter are used to modify the data in AngularJS. Here we create a custom filter to remove the HTML tags from a string. “removeHTMLTags” is the filter name. Used regular expression to strip the HTML tags from the given string..
In Order to modify the data filters are used in AngularJS. This can be used in the expression with a pipe symbol. There are some predefined filters in AngularJS such as..