1'use strict'; 2angular.module('sfmStore') 3 .service('$categories', function($http, $q) { 4 this.getProductCategories = function() { 5 return $http.get('/store?format=json&task=categories.api_categoryList'); 6 } 7 8 this.getCategoryById = function(id) { 9 var deferred = $q.defer(); 10 $http.get('/store?format=json&task=categories.api_categoryList').then(function(res) { 11 var data = res.data.data; 12 var category = data.filter(function(item) { 13 return item.id === id; 14 }); 15 deferred.resolve(category); 16 }); 17 return deferred.promise; 18 } 19 });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.