 
         
             
            “I want to build an app!”
                 
                 
                 
                 
            
HTML5 that acts like native
Web wrapped in native layer
Direct access to native APIs
Familiar web dev environment
A single code base (web platform!)
“It's not 2007 anymore”
 
            | Year | Device | Processor | RAM | 
|---|---|---|---|
| 2007 | iPhone | 400 MHz | 128 MB | 
| 2010 | iPhone 4 | 1 GHz | 512 MB | 
| 2015 | iPhone 6 | 1.4 GHz dual-core | 1 GB | 
| 2016 | iPhone 7 | 2.34 GHz Quad-core | 2 GB | 
caniuse.com is lookin' pretty good nowadays
Android is now Chromium-based
iOS users keep their devices up-to-date
                 
                 
            
 
            https://mixpanel.com/trends/#report/ios_8/from_date:-141,report_unit:day,to_date:0
 
            https://mixpanel.com/trends/#report/android_os_adoption
Common UI, APIs, views, navigation, stack history, transitions, interactions, gestures, etc.
 
         
                 
                 
            (You'll feel right at home)
Extends the HTML vocabulary
Proven for large-scale app development
UI Components using Directives & Services
CSS generated from the Sass preprocessor
Quickly give your app its own look and feel
CSS designed to be easily overridden
Variables based with default settings
Structural framework for dynamic web applications
Designed by Misko Hevery
First released in June 2012
One of the most popular front-end JS frameworks
Applied to specify the root of the application
Used to evaluate an expression, initialize a JavaScript variable
 
Evaluated against an Angular scope object
 {{dish.name}} 
binds the input value to a variable within the scope (Two-way data binding)
<div ng-app>
    <label>Name:</label>
    <input type="text" ng-model="yourName">
    <p>Hello {{yourName}}!</p>
</div>
                    Loops over items in a collection
-      
    ...
Angular is built with MVC, MVW in specific!
            JavaScript object containing attributes/properties and functions
Exposes variables and functionality to expressions and directives
            
            formatting the value of an expression for display to the end user
can be used in view templates, controllers or services
Examples: uppercase/lowercase, currency, date, filter, orderBy, etc.
    {{dish.price | currency}}
            Here is a demo of the conFusion App implementation of Models, Views, Controllers
Here is a demo of the conFusion App implementation of Filters
an object that refers to the application model
glue between the view and the controller
{{carname}}
            
            Two-way Data Binding makes it straightforward to work with forms
   
            
            Select items can be bound by defining JavaScript object
            Then bind using ng-options directive
            
<form class="form-horizontal" name="feedbackForm" ng-submit="sendFeedback()" novalidate>
            Bootstrap provides a lot of CSS classes to enable display of form validation state and messages
Here is a demo of the conFusion App implementation of Form Validation
                
angular.module('confusionApp')
.factory('menuFactory', function()  {
    var menufac = {};
    var dishes = […];
    menufac.getDishes = function(){
        return dishes;
    };
    menufac.getDish = function(index)    
    {
        return  dishes[index];
    };
    return  menufac;
});
---------------------------------------------------------------
angular.module('confusionApp')
.controller('MenuController', ['$scope', 'menuFactory', function($scope, menuFactory)   
{
    $scope.dishes = menuFactory.getDishes();
}]);
            
angular.module('confusionApp')
.service('menuFactory', function(){
    var dishes = […];
    this.getDishes = function(){
        return dishes;
    };
    this.getDish = function(index)    
    {
        return dishes[index];
    };
});
---------------------------------------------------------------
angular.module('confusionApp')
.controller('MenuController', ['$scope', 'menuFactory', function($scope, menuFactory)   
{
    $scope.dishes = menuFactory.getDishes();
}]);
            
 
         
        
angular.module('confusionApp', ['ui.router'])
                
.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
    .state('app', {
        url: '/',
        views: {
            'header': { templateUrl : 'views/header.html' },
            'content': { template : 'To be Completed
', controller : 'IndexController' },
            'footer': { templateUrl : 'views/footer.html' }
        }
    })                                              
    .state('app.aboutus', {
        url: 'aboutus',
        views: {
            'content@': { template: 'To be Completed
', controller : 'AboutController' }
        }
    });
    $urlRouterProvider.otherwise('/');
});
                
                
                Here is a demo of the conFusion App implementation of Angular UI-Router in a SPA
    $http({method: 'GET', url: '/dishes'})
        .then(function() {...}, function() {...});
            
$http.get(baseURL+"dishes")
    .then(
        function(response) {
            $scope.dishes = response.data;
            $scope.showMenu = true;
        },
        function(response) {
            $scope.message = "Error: " + response.status + " " + response.statusText;
        }
    );
            
"http://www.conFusion.food/dishes/"
"http://www.conFusion.food/dishes/123"
"http://www.conFusion.food/promotions/"
                
POST "http://www.conFusion.food/feedback/"     
                
PUT "http://www.conFusion.food/dishes/123"     
                
DELETE "http://www.conFusion.food/dishes/456"    
                
angular.module('confusionApp', ['ui.router', 'ngResource'])
                
$resource(url, [paramDefaults], [actions], options);
                Example
$resource(baseURL+"dishes/:id", null, {'update':{method:'PUT' }})
    .get({id:0}).$promise.then(
        function(response){
            $scope.dish = response;
            $scope.showDish = true;
        },
        function(response){
            $scope.message = "Error: " + response.status + " " + response.statusText;
        }
    );
            Here is a demo of the conFusion App implementation of REST services in a SPA
    
        List Item {{ item.id }}
     
 
    
        {{ c.name }}
        {{ c.email }}
    
 
            700+ MIT licensed font-icons included
npm install -g ionic cordova
 
            Boilerplate app structure ready for customization
LiveReload both local and native builds
Build and run native apps
Chromium for Android WebViews
Upgrade Android 4.1+ and above
Same hardware, modern software
Amazing performance improvements
                Getting started guide
                
                    ionicframework.com/getting-started
                
            
                Documentation
                
                    ionicframework.com/docs
                
            
                Visit the Community Forum
                
                    forum.ionicframework.com
                
            
                Contribute on GitHub
                
                    github.com/driftyco/ionic
                
            
</html>