Showing posts with label Angular JS. Show all posts
Showing posts with label Angular JS. Show all posts

Tuesday, December 20, 2016

Which is the Front-end technologies for SharePoint Framework development?

Microsoft has clearly mentioned in their key notes, they are building the framework and it is related samples using KnockoutJs and ReactJs with Typescript. Since it is an open-source based development model, choosing the framework/technologies are completely our choices, based on our knowledge and requirements. Here I have listed out a few front-end technologies.
  1. Angular 1.x - https://angularjs.org/
  2. Angular 2 - https://angular.io/
  3. ReactJs - https://facebook.github.io/react/
  4. KnockoutJs - http://knockoutjs.com/
  5. Ember.Js - http://emberjs.com/
  6. Backbone.Js - http://backbonejs.org/
  7. Aurelia.io - http://aurelia.io/

Friday, August 26, 2016

Mouse Events


Mouse events moves

ng-mouseenter
ng-mouseover
ng-mousemove
ng-mouseleave

mouse button is clicked

ng-mousedown
ng-mouseup
ng-click

Angular JS Events

Angular JS Events

  1. ng-blur
  2. ng-change
  3. ng-click
  4. ng-copy
  5. ng-cut
  6. ng-dblclick
  7. ng-focus
  8. ng-keydown
  9. ng-keypress
  10. ng-keyup
  11. ng-mousedown
  12. ng-mouseenter
  13. ng-mouseleave
  14. ng-mousemove
  15. ng-mouseover
  16. ng-mouseup
  17. ng-paste



Example:

<div ng-app="test" ng-controller="action">

<button ng-click="count = count+1 ">Click Me!</button>

<p>{{ count }}</p>

</div>
<script>
var app = angular.module('test', []);
app.controller('action', function($scope) {
    $scope.count = 0;
});
</script>

Search /Filter in Angular JS

Search action Angular JS

<div ng-app="mysearch" ng-controller="namesearch">


<p><input type="text" ng-model="test"></p>

<ul>
  <li ng-repeat="x in name | filter:test">
    {{ x }}
  </li>
</ul>

</div>

<script>
angular.module('mysearch', []).controller('namesearch', function($scope) {
    $scope.name = [
        'Ram',
        'Nandu',
        'vel',
        'mani',
        'jubi',
       
    ];
});
</script>

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', []);
app.run(function($rootScope) {
    $rootScope.color = 'blue';
});

</script>