RcBuilder@walla.com
call centre: 054-5614020

angular tracks basic example

Posted by: RcBuilder  /   Category: $http / AngularJS / autocomplete / Controllers / CSS / Data Providers / Directives / Events / Factories / HTML / JAVASCRIPT / jQuery / jquery-ui / Model / module / OOP / Services / Views   /   No Comments
27
Jan
2016

angular tracks basic example app.js var module = angular.module('my-app', ; $scope.tracks = ); } $scope.Search = function () { tracksFactory.searchForTracks($scope.searchPhrase, function (response) { $scope.tracks = response; }); } $scope.LoadAutocomplete = function () { if ($scope.searchPhrase.lengh < 3) return; tracksFactory.getNames($scope.searchPhrase, function (response) { angular.element("#searchPhrase").autocomplete({ source: response }); }); } }); module.factory('tracksFactory', function ($http) { var server = 'http://ws.audioscrobbler.com/2.0/'; var queryBase = '?method=track.search&track={0}&api_key=0604d2c5492dc743997cabe3fd636099&format=json&limit={1}'; var foreach = function (arr, callback) { for (var i = 0; i < arr.length; i++) callback.call(arr); }; return { getNames:.

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 cards Game basic example

Posted by: RcBuilder  /   Category: AngularJS / Controllers / Directives / Events / Examples / Model / module / Views   /   No Comments
26
Nov
2014

angular cards Game basic example <!doctype html> <html lang="he" ng-app="my_application"> <head> <title></title> <script src="angular.min.js" type="text/javascript"></script> <style type="text/css"> .Card{ width:300px; height:300px; line-height:300px; background-color:#ddd; text-align:center; font-size:200px; } .Result { width:600px; text-align:center; padding-top:20px; font-size:100px; } </style> </head> <body> <div ng-controller="HomeController"> <div style="display:inline-block;"> <ng-Card number="{{numberLeft}}" ng-click="Choose('LEFT');" /> </div> <div style="display:inline-block;"> <ng-Card number="{{numberRight}}" ng-click="Choose('RIGHT');" /> </div> <div class="Result"> {{ Result }} </div> </div> </body> <script type="text/javascript"> var app = angular.module('my_application', []); app.directive('ngCard', function () { return { restrict: 'E', // tag or comment template: '<div class="Card">{{ number }}</div>', replace: true, scope: { number: "@number" } }; }); app.controller('HomeController', function ($scope) { $scope.numberLeft = $scope.numberRight = 0; $scope.Result = ''; $scope.Choose.

Read more

Angular basic Example

Posted by: RcBuilder  /   Category: $http / AngularJS / Config / Controllers / Data Bind / Data Providers / Directives / Events / Examples / Factories / Filters / Model / module / Routing / Services / Views   /   No Comments
27
Oct
2014

Angular basic Example index.htm <!doctype html> <html ng-app="my_application"> <head> <title>AngularJS</title> <style> body{ font: normal normal 400 12px/1.2em arial; background-color:#FFFFFE;} </style> </head> <body> <ul> <li> <a href="#users">Users</a> <ul> <li><a href="#users/Roby">Users1</a></li> <li><a href="#users/Shirly">Users2</a></li> </ul> </li> <li><a href="#products">Products</a></li> </ul> <!-- active view placeholder--> <div ng-view class="slide-animation"></div> <script type="text/javascript" src="angular.min.js"></script> <script type="text/javascript" src="angular-route.min.js"></script> <script type="text/javascript" src="angular-animate.min.js"></script> <script type="text/javascript" src="app/config.js"></script> <script type="text/javascript" src="app/factories/products.js"></script> <script type="text/javascript" src="app/factories/users.js"></script> <script type="text/javascript" src="app/controllers/products.js"></script> <script type="text/javascript" src="app/controllers/users.js"></script> <script type="text/javascript" src="app/directives/global.js"></script> <script type="text/javascript" src="app/directives/products.js"></script> <script type="text/javascript" src="app/filters/global.js"></script> <script type="text/javascript" src="app/filters/products.js"></script> <script type="text/javascript" src="app/app.js"></script> </body> </html> app.js // define the page as application (module is a.

Read more

Adwords scripts UTILITIES Using Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / UTILITIES   /   No Comments
07
Jun
2014

Adwords scripts UTILITIES Using Examples // format date var dt = new Date(); var sDate1 = Utilities.formatDate(dt, 'GMT', 'yy-MM-dd HH:mm:ss'); // 14-02-16 07:02:28 var sDate2 = Utilities.formatDate(dt, 'GMT', 'dd/MM/yyyy'); // 16/02/2014 var sDate3 = Utilities.formatDate(dt, 'GMT', 'HH:mm'); // 07:02 -------------------- // encode and decode values var encoded = Utilities.base64Encode('Hello World'); Logger.log(encoded); var decoded = Utilities.base64Decode(encoded); Logger.log(Utilities.newBlob(decoded).getDataAsString()); -------------------- // format string Utilities.formatString('%6s', 'abc'); // " abc" -------------------- // convert string to csv var.

Read more

Adwords scripts XML Using Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / SOURCE CODE / XML / XML DOCUMENT   /   No Comments
06
Jun
2014

Adwords scripts XML Using Examples // add elements from array of data var xml = '<root></root>'; var document = XmlService.parse(xml); var root = document.getRootElement(); var arr = ; root.setAttribute('total', arr.length); for(i in arr) root.addContent(XmlService.createElement('value').setText(arr)); var formatted_xml = XmlService.getPrettyFormat().format(document); Logger.log(formatted_xml); - result -- <?xml version="1.0" encoding="UTF-8"?> <root.

Read more

Adwords scripts XML Using Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / SOURCE CODE / XML / XML DOCUMENT   /   No Comments
06
Jun
2014

Adwords scripts XML Using Examples // create xml document with cdata, text and elements var cdata = XmlService.createCdata('<span style="font-weight:bold;color:red;">HELLO WORLD</span>'); var text = XmlService.createText('HELLO WORLD'); var root = XmlService.createElement('root'); var elem1 = XmlService.createElement('elem1').setText('HELLO WORLD'); var elem2 = XmlService.createElement('elem2').addContent(text); var elem3 = XmlService.createElement('elem3').addContent(cdata); root.addContent(elem1).addContent(elem2).addContent(elem3); var document = XmlService.createDocument(root); var formatted_xml = XmlService.getPrettyFormat().format(document); Logger.log(formatted_xml); - result -- <?xml version="1.0" encoding="UTF-8"?> <root> <elem1>HELLO WORLD</elem1> <elem2>HELLO.

Read more

Adwords scripts XML Using Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / SOURCE CODE / XML / XML DOCUMENT   /   No Comments
06
Jun
2014

Adwords scripts XML Using Examples // create an xml document, read and write attributes from and to it var xml = '<users> <user firstName="Roby" lastName="Cohen" /> <user firstName="Avi" lastName="Cohen" /> <user firstName="Shirly" lastName="Massa" /> </users>'; var document = XmlService.parse(xml); var users = document.getRootElement().getChildren('user'); for (var i = 0; i < users.length; i++) { var user = users; var firstName = user.getAttribute('firstName').getValue(); var lastName = user.getAttribute('lastName').getValue(); user.setAttribute('fullName', firstName +.

Read more

Adwords scripts XML Using Examples

Posted by: RcBuilder  /   Category: Adwords Scripts / JAVASCRIPT / SEM / SOURCE CODE / XML / XML DOCUMENT   /   1 Comment
06
Jun
2014

Adwords scripts XML Using Examples // create xml document from string and format it in several ways var xml = '<root><a><b>Text!</b><b>More text!</b></a></root>'; var document = XmlService.parse(xml); var output1 = XmlService.getCompactFormat().format(document); var output2 = XmlService.getRawFormat().format(document); var output3 = XmlService.getPrettyFormat().format(document); var output4 = XmlService.getCompactFormat().setLineSeparator('\n').setEncoding('UTF-8').setIndent(' ').format(document); // explicit Logger.log(output1); Logger.log(output2); Logger.log(output3); Logger.log(output4); - result - <?xml version="1.0" encoding="UTF-8"?> <root><a><b>Text!</b><b>More text!</b></a></root> <?xml version="1.0" encoding="UTF-8"?> <root><a><b>Text!</b><b>More text!</b></a></root> <?xml version="1.0" encoding="UTF-8"?> <root> <a> <b>Text!</b> <b>More text!</b> </a> </root> <?xml version="1.0" encoding="UTF-8"?> <root> <a> <b>Text!</b> <b>More.

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