Skip to content

Commit

Permalink
Create main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jesro authored Aug 20, 2018
1 parent cd7a477 commit b996e8c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions jquery-knockoutjs-requirejs/modules/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
define(['jquery','knockoutjs'],function($,ko){

function viewModel(){
var self = this;
self.allProducts=ko.observableArray([]);
$.getJSON("https://manage.hawksearch.com/sites/uselectric/?ajax=1&mpp=15&pg=1&category=Firestop-Devices--Accessories&hawkcustom=region01&sort=topsellers&hawkspellcheck=0&hawkoutput=json&hawkfacets=category,brand_name,sub_brand,item_name,type", function(data) {
self.allProducts(data);
});
self.DropdownValue=ko.observableArray();
self.isSelected=ko.observable(true);
}
ko.applyBindings(viewModel);
});

0 comments on commit b996e8c

Please sign in to comment.