Showing posts with label AngularJS. Show all posts
Showing posts with label AngularJS. Show all posts

Friday, August 26, 2016

26 Aug

Angular JS in Scope

-binding part properties and methods both view and controller <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <body ng-app="myApp"> <p>The rootScope's favorite color:</p> <h1>{{color}}</h1> <script> var app = angular.module('myApp',...
26 Aug

Controller in Angular JS

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script> angular.module('test', []).controller('menu', function($scope) {     $scope.names = [         {furit:'Orange',vegtable:'Drumstick'},         {furit:'Apple',vegtable:'Ladyfinger'},  ...
26 Aug

Angular JS Databinding

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <div ng-app="test" ng-controller="myC">     Name: <input ng-model="firstname">     <h1>{{firstname}}</h1>  <h1>{{lastname}}</h1> </div> <script> var...

Tuesday, August 9, 2016

09 Aug

Addevent listener in Angular Js

    Name:<input id="txtname" type="text"/>     Welcome!     <script>       var txtipt = document.getElementById('txtname');       txtipt.addEventListener('keyup', function(){         var text = txtipt.value;      ...

Wednesday, July 20, 2016

20 Jul

objects in Angular JS

Objects in angular js Example: <html > <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> </head> <body> <div ng-app="" ng-init="emp={id:'1',name:'peak'}"> <p>The Emp Id is {{ emp.id }}</p> </div> </...