Friday, August 12, 2016
- Beautiful UI
- connectivity-gsm,cdma,UMTS,buletooth
- storage-SQLite,light weight retional database
- media-h.263,h.264,mpeg 4,amr,aac,aac5.1 mp3,ogg,wave
- messaging-SMS and MMS
- web browser-based on open souce webkit layout engine,
- chorme javascript engine supporting HTML5 and CSS3
- multi touch-HTC hero
- multitasking-run simultaneously,one task to another task
- resizable widgets-content or shrink them to save space
- multi language-single direction and bi-directional
- gcm-google cloud messaging
- wifi direct-peer to peer connection
- android Beam-NFC based technology
Thursday, August 11, 2016
<script>
//Defining Services Using Service
var app = angular.module('app', []);
app.service('MathService', function() {
this.add = function(a, b) { return a + b };
this.subtract = function(a, b) { return a - b };
this.multiply = function(a, b) { return a * b };
this.divide = function(a, b) { return a / b };
});
app.service('CalculatorService', function(MathService){
this.square = function(a) { return MathService.multiply(a,a); };
this.cube = function(a) {
return MathService.multiply(a, MathService.multiply(a,a));
};
});
app.controller('CalculatorController', function($scope, CalculatorService) {
$scope.doSquare = function() {
$scope.answer = CalculatorService.square($scope.number);
}
$scope.doCube = function() {
$scope.answer = CalculatorService.cube($scope.number);
}
});
</script>
<div ng-app="app">
<div ng-controller="CalculatorController">
Enter a number:
<input ng-model="number" type="number">
<button ng-click="doSquare()"><b>X<sup>2</sup></b></button>
<button ng-click="doCube()"><b>X<sup>3</sup></b></button>
<div>Answer: {{answer}}</div>
</div>
</div>
//Defining Services Using Service
var app = angular.module('app', []);
app.service('MathService', function() {
this.add = function(a, b) { return a + b };
this.subtract = function(a, b) { return a - b };
this.multiply = function(a, b) { return a * b };
this.divide = function(a, b) { return a / b };
});
app.service('CalculatorService', function(MathService){
this.square = function(a) { return MathService.multiply(a,a); };
this.cube = function(a) {
return MathService.multiply(a, MathService.multiply(a,a));
};
});
app.controller('CalculatorController', function($scope, CalculatorService) {
$scope.doSquare = function() {
$scope.answer = CalculatorService.square($scope.number);
}
$scope.doCube = function() {
$scope.answer = CalculatorService.cube($scope.number);
}
});
</script>
<div ng-app="app">
<div ng-controller="CalculatorController">
Enter a number:
<input ng-model="number" type="number">
<button ng-click="doSquare()"><b>X<sup>2</sup></b></button>
<button ng-click="doCube()"><b>X<sup>3</sup></b></button>
<div>Answer: {{answer}}</div>
</div>
</div>
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<script>
//Create module
var app = angular.module("moduleName",[]);
//Create the controller
function myControl($scope) {
$scope.yourProperty = 'This is Actioncontroller';
}
//Register controller with module
app.controller("myControl",myControl);
</script>
</head>
<body>
<h1 ng-controller="myControl">Message - {{ yourProperty }}</h1>
<script>
//Create module
var app = angular.module("moduleName",[]);
//Create the controller
function myControl($scope) {
$scope.yourProperty = 'This is Actioncontroller';
}
//Register controller with module
app.controller("myControl",myControl);
</script>
</head>
<body>
<h1 ng-controller="myControl">Message - {{ yourProperty }}</h1>