Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. return {
  2.  
  3.  
  4. add : function(incategories){
  5. categories=incategories;
  6. console.log(subcategories)
  7. },
  8.  
  9. addcatname:function(incat){
  10. category=incat
  11. console.log(category)
  12. },
  13.  
  14.  
  15. get : function(){
  16. return categories;
  17. console.log(category)
  18. },
  19.  
  20. getcatname:function(){
  21. return category;
  22. },
  23.  
  24. vm.getSub=function(){
  25. vm.category=CategoryService.getcatname();
  26. vm.subcategories=CategoryService.get();
  27. vm.index = 0;
  28. vm.array1 = [];
  29. for(var i=0; i<vm.subcategories.length/2;i++)
  30. vm.array1.push(i);
  31. return true;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement