Tuesday, September 13, 2016

Ionic Creator 103: Set Default Page



.
Ionic Creator: Set Default Page

1) Create a new project

Project name: Test
Project template: Side Menu
Set your preferred layout display.
Assuming you have a Login Page as shown below.
The next step shows how to link the list item to the Login Page.

2) Select Side Menu List-Item

Select Menu/List/List-Item

3) Provide the Content and Link

4) Set Default Page

At anytime, you can change the default page by clicking the pin icon for that page.
The following example shows a Home Page that is selected as a default page.

Reference:


.

Monday, September 12, 2016

Ionic Creator 102: Forms


.
Ionic Creator 102: Forms

1) Create a new project

Project Name: List Item Buttons
Template: Blank.

2) Add Form Object to the Page Layout.

By default, the Form Object consists of a Toggle Button, a Radio Button and a Text Input.

3) Add Additional Form Objects

Add three Checkboxes, a Range Slider and a Select Object.
For Select Object, you need to add Option Values in the Right Panel.
.

Sunday, September 11, 2016

Ionic Creator 101: Linking Pages



.
Ionic Creator 101: Linking Pages

1) Create a new project

Project name: Linking Pages
Project template: blank
Set your preferred layout display.

2) Add Button Component

  1. Select Page.
  2. Click and Drag Button to the layout.

3) Add a new page

Click Add Page button.
Select Login Page.

4) Create Link

Select the first page.
Select the button.
Notice the right panel.
Select the page that you want to link, eg Login.

5) Preview

Clicking the button should bring you the nex page.
Done.
.

Saturday, September 10, 2016

Ionic Creator: List Item Buttons Delete, Reorder, and Swipe


.
Ionic Creator: List Item Buttons  Delete, Reorder, and Swipe

1) Create a new project

Project Name: List Item Buttons
Template: Blank.

2) Add List Item Component

Drag List Item component to the Main Window.
List Item in the Page Container.

3) Add Controller Codes

Click the Page item in the Code Navigator Window.
Add codes to the Page function.
// The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams) {
   
//hide buttons during startup
$scope.showDelete=false;
$scope.showReorder=false;
//toggle hide and show buttons
$scope.toggle=function(v){
    $scope[v]=!$scope[v];    
}
//delete task
$scope.delete=function(item){
    $scope.items.splice($scope.items.indexOf(item),1);
}
//reorder task
$scope.reorder=function(item,fromIndex,toIndex){
   $scope.items.splice(fromIndex,1);
   $scope.items.splice(toIndex,0,item);
}
//populate list
$scope.items=[
    {
        id:'1'
    },
    {
        id:'2'
    },
    {
        id:'3'
    },
    {
        id:'4'
    },
    {  
        id:'5'
    }
    ]
}

4) Add Directives To List Item Component

Select List Item.
Enter Directive Values.
ng-repeat
item in items
Outcome.

5) Preview

Click the Preview Button.
Outcome.

6) Add Header Buttons

(Delete and Reorder Buttons)
Select The Page
Enable the buttons.
Set ion-ios-minus icon for Left Button.
Set text “Reorder” for Right Button.
Preview.

7) Add Directives To Page

(This is to provide the toggle functionality to the Header Buttons ie when the user click the buttons on the Header, the showDelete or showReorder function codes in Step 3 will be called )
Select The Page
Enter Directives Values
ng-click
toggle('showDelete')
ng-click
toggle('showReorder')

Bind the directives to the Button Codes.

Click the bind button.
Click the pointed line.
Delete Button.
Reorder Button.
Preview.
Preview.

8) Add Directives To List

(This is to provide the toggle functionality to the List ie when the user click the buttons on the list, the showDelete or showReorder function codes in Step 3 will be called)
Select the List.
Enter Directive values.

9) Add Directives To List Item

(This is to provide the Delete or Reorder functionality to the list item ie when the user click the buttons on a list item, the delete or reorder task will be applied to that item)
Select List Item.
Enter Directive Values.
ng-click
delete(item)
on-reorder
reorder(item,$fromIndex,$toIndex)

Bind the Directives to the List Item codes

Click the Bind Button.
Click the highlighted codes line.
Delete Button for List Item.
Reorder Button for List Item

10) Test Run

Delete Item 2.
Reposition Item 1.
.

Monday, September 5, 2016

What Is Meteor JS?


.
Meteor, or MeteorJS, is a free and open-source JavaScript web framework written using Node.js. Meteor allows for rapid prototyping and produces cross-platform (web, Android, iOS) code. It integrates with MongoDB and uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients without requiring the developer to write any synchronization code. On the client, Meteor depends on jQuery and can be used with any JavaScript UI widget library.

Meteor is developed by the Meteor Development Group. The startup was incubated by Y Combinator and received $11.2M in funding from Andreessen Horowitz in July 2012.