RcBuilder@walla.com
call centre: 054-5614020

javascript advanced arrays

Posted by: RcBuilder  /   Category: Array / class / function / JAVASCRIPT / Object / OOP   /   No Comments
26
Jan
2016

javascript advanced arrays we can define data members, public properties, private and public methods, arrays, matrixes, custom objects ... var MyObject = { prop1: 'some string value', prop2: 40, prop3: 300.23, prop4: , prop5: { x: 40, y: 50, z: 70 }, prop6: new Array(), fun1: function () { console.log(this.prop1); }, fun2: function (index) { console.log(this.prop4); }, fun3: function () { console.log(this.prop5.z); }, fun4: function (item) { this.prop6.push(item); console.log(this.prop6.length); } }; console.log(MyObject.prop1); // some string value console.log(MyObject.prop2); // 40 MyObject.fun1();.

Read more

javascript object using prototype

Posted by: RcBuilder  /   Category: class / function / JAVASCRIPT / Object / OOP / prototype   /   No Comments
26
Jan
2016

javascript object using prototype // prototype (best practice) function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } // this 'sayYourName' method will be created only once for all Person instances // instead of per each instance - less CPU usage (no need to create it per instance) // and less Memory consumption (no need to store it per instance) // it's recommended.

Read more

javascript object

Posted by: RcBuilder  /   Category: class / function / JAVASCRIPT / Object / OOP   /   No Comments
26
Jan
2016

javascript object // Object function Person(firstName, lastName) { // 'this' variable refer to the container object ('Person' in this case) this.firstName = firstName; this.lastName = lastName; this.sayYourName = function () { return this.firstName + ' ' + this.lastName; } } var person = new Person('Roby', 'Cohen'); var person2 = new Person('Avi', 'Cohen'); console.log(person.sayYourName()); // Roby Cohen console.log(person2.sayYourName()); // Avi.

Read more

javascript Factory

Posted by: RcBuilder  /   Category: class / function / JAVASCRIPT / Object / OOP   /   No Comments
26
Jan
2016

javascript Factory // Factory (multiple instances) function PersonFactory(firstName, lastName) { return { firstName: firstName, lastName: lastName, sayYourName: function () { return this.firstName + ' ' + this.lastName; } }; } var person = PersonFactory('Roby', 'Cohen'); var person2 = PersonFactory('Avi', 'Cohen'); console.log(person.sayYourName()); // Roby Cohen console.log(person2.sayYourName()); // Avi.

Read more

javascript Literal

Posted by: RcBuilder  /   Category: class / function / JAVASCRIPT / Object / OOP   /   No Comments
26
Jan
2016

javascript Literal // Literal (a single instance) var person = { firstName: 'Roby', lastName: 'Cohen', sayYourName: function () { return this.firstName + ' ' + this.lastName; } }; console.log(person.sayYourName()); // Roby.

Read more

angular modules

Posted by: RcBuilder  /   Category: AngularJS / Config / Model / module / Routing   /   No Comments
26
Jan
2016

angular modules you can refer to module as a container or a namespace it's recommended to bind a module to your page and turn it to some sort of an application you can add config to each module and then add a routes mechanism to it bind a page to specific module - to bind a page to a specific.

Read more

Angular module dependency

Posted by: RcBuilder  /   Category: $http / $location / AngularJS / Config / Controllers / Data Providers / Directives / Factories / Filters / Model / module / Routing / Services   /   No Comments
26
Jan
2016

Angular module dependency STEPS 1. create a module and add elements to it (directives, filters etc.) 2. add the js file where your module is defined to the application e.g: <script type="text/javascript" src="app/dependencies/some_module.js"></script> 3. add your module as a dependency to the current active module var my_module = angular.module('my_application', ); 4. that's it! use elements from your module in the current application Example -- some_module.js.

Read more

angular with jQuery

Posted by: RcBuilder  /   Category: AngularJS / Config / Directives / jQuery / module / Views   /   No Comments
26
Jan
2016

angular with jQuery use jqLite library angular includes a built-in library called jqLite- it's actually a lite weight library based on the known jquery. this library includes only the basics of the jquery library core. the 'element' object is the access point to those libraries. (see 'jqLite available methods' below) note! to transfer to jquery mode, all you need to do.

Read more

angular phone finder basic example

Posted by: RcBuilder  /   Category: AngularJS / Controllers / Data Bind / Data Providers / Directives / Events / Examples / Factories / Filters / Model / module / Services / Views   /   No Comments
26
Jan
2016

angular phone finder basic example <!doctype html> <html> <head> <title>Test 888</title> <style type="text/css"> select { width: 120px;} div.filters > div{ padding:4px 0; border-right:solid 1px #ddd; } div.header{ height:40px; line-height:40px; text-align:center; border-bottom:solid 2px #000; } span.required { font-size:12px; color:red; } </style> </head> <body> <div ng-app="myApp"> <div ng-controller="homeController"> <div class="row header"> Phone Finder </div> <div class="row"> <div class="col-md-2 filters"> <div> <select ng-model="selectedCountry"> <option value="" selected>select</option> <option ng-repeat="country in countries">{{country}}</option> </select> <span ng-show="!hasSelectedCountry" class="required"> required </span> </div> <div> <select ng-model="selectedCity"> <option value="" selected>select</option> <option ng-repeat="city in cities">{{city}}</option> </select> <span ng-show="!hasSelectedCity" class="required"> required </span> </div> <div> <input type="button" ng-click="Search()" value="Search" /> </div> </div> <div class="col-md-10"> <table class="table table-bordered table-striped"> <tr ng-repeat="user in users"> <td>{{user.id}}</td> <td>{{user.name}}</td> <td>{{user.phone}}</td> </tr> </table> </div> </div> </div> </div> <script type="text/javascript".

Read more

Angular CDN

Posted by: RcBuilder  /   Category: AngularJS / CDN   /   No Comments
26
Jan
2016

LATEST https://code.angularjs.org/ CDN <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-animate.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-cookies.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-resource.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-route.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular-sanitize.min.js"></script> <script.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים