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 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 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 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

AngularJS Project

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

AngularJS Project define angularJS project (steps) 1. (page) add reference to the base necessary js files: angular.min.js and angular-route.min.js 2. define a factory/service that serves as the data supplier (DAL Layer) 3. define a controller that serves as the logic (BLL Layer) notice! this file rely on the factory so you need to inject the factory in its constructor 4. define.

Read more

AngularJS Modules (Apps)

Posted by: RcBuilder  /   Category: $http / AngularJS / Config / Controllers / Data Bind / Data Providers / Directives / Events / Factories / Filters / HTML / HTML 5 / JAVASCRIPT / Model / module / Services / Views   /   No Comments
26
Oct
2014

AngularJS Modules (Apps) 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.

Read more

AngularJS $http

Posted by: RcBuilder  /   Category: $http / AngularJS / Controllers / Data Providers / Factories / HTML / HTML 5 / JAVASCRIPT / Services   /   No Comments
26
Oct
2014

AngularJS $http * use $http to perform a server calls - you need to add it as argument to the factory/service function types 1.get(url); 2.head(url); 3.post(url, data); 4.put(url, data); 5.delete(url); 6.jsonp(url); 7.patch(url, data); structure $http.get() .success(function (data, status, headers, config) { }) .error(function (data, status, headers, config) { }); example $http.get('http://myserver.com/api/getjson.ashx') .success(function (data, status, headers, config) { }) .error(function (data, status, headers, config) { }); usage as a factory you'll find below two options.

Read more

AngularJS Services

Posted by: RcBuilder  /   Category: AngularJS / Controllers / Data Providers / Factories / Services   /   No Comments
26
Oct
2014

AngularJS Services * similar to factory except of the fact that we're working on the object itself instead of creating new object and return it * the service definition performed via the module.service built-in faction * serve as data supplier in order to seperate the data from the logic layer (the controller) the controller will get the data from.

Read more

AngularJS Factory

Posted by: RcBuilder  /   Category: AngularJS / Controllers / Data Providers / Factories / HTML / HTML 5 / JAVASCRIPT   /   No Comments
26
Oct
2014

AngularJS Factory * the factory definition performed via the module.factory built-in faction * when working with factory, you create your custom object and return it * serve as data supplier in order to seperate the data from the logic layer (the controller) the controller will get the data from the factory * after you create your factory object, use the.

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