Javascript
IonFramework and IonSelector are part of interactive set of IonDesign, they are responsible to ensuring the user experience. Below you can see the list of API functions.
IonFramework
IonFramework controls the components of IonDesign, as well as the user interaction events. It is responsible for ensuring a better user experience, from it is possible, for example, to display dialogs, alerts and warnings. In general, make the user experience richer in your application.
Ion.createEvent()
Ion.dialog(data)
Shows a dialog.
Parameter | Type | Description |
---|---|---|
data | Object |
An object with dialog properties, with the attributes below:
title (string): The title of the dialog subtitle (string): The subtitle of the dialog content (string): The main content of the dialog affirmativeText (string): The text of the affirmation button dismissiveText (string): The text of the deny button dismissible (boolean): If true, The dialog is dismissed on press the overlay class (string): An css class for customization |
Ion.filter(array, key, filter)
Returns a new array with the matches of the filter applied to the fields chosen.
Parameter | Type | Description |
---|---|---|
array | Array | The array of objects that will be filtered |
key | Array | string | A field or an array of fields of the array |
filter | string | The string to be searched for |
var numbers = [{
number: 1,
name: "One"
},
{
number: 2,
name: "Two"
},
{
number: 3,
name: "Three"
},
{
number: 4,
name: "Four"
},
{
number: 5,
name: "Five"
}];
Ion.filter(numbers, "name", "T"); //[{number: 2, name: "Two"}, {number: 3, name: "Three"}]
Ion.get($element, context)
Instances the IonSelector for an element based on a context element or the document.
Parameter | Type | Description |
---|---|---|
$element | Array | Element | string | An css selector string or an element or array of elements |
context | Element | The base element for query. Default is document |
Ion.get("p");
Ion.http()
Ion.isUnique()
Ion.matches()
Ion.toast()
IonSelector
IonSelector is the part of the IonDesign API for interacting with the Document Object Model (DOM), in other words, the Web document. Through this APi it is possible to create, remove and edit the HTML elements of the page in an easier way.
.addClass()
.append()
.appendTo()
.children()
.chips()
.clone()
.each()
.emit()
.find()
.getAttr()
.hasClass()
.html()
.insertAfter()
.insertBefore()
.next()
.on()
.parent()
.parents()
.prepend()
.prependTo()
.prev()
.position()
.remove()
.removeAttr()
.removeClass()
.setAttr()
.style()
.tabs()
.toggleClass()
.value()
.view()
IonView
IonView provides a way to build dynamic and reactive user interfaces. Through declarative syntax it is possible to show or hide elements, display text dinamically, list content and handle user action.