Jump to content

Well I need some help on my store project. (Tons of info in post) Firebase Node.js HTML.

upliftsleet1974

I am working on setting up a catalog of parts and such for a project I am working on. I am using firebase to store all the data and at this point have it displaying the items. But at this point the filter to organize by type of product is not working. And I have tried just about everything to no avail so looks like I need some help. Feel free to ask for any code you need to see but this is a link to the site page https://deltadoor.herokuapp.com/products.html it should work so I can enter a price a product name and or click one of the tabs.
 
 
 
And now the code. 
 
This is the code to display it all out on the page:

       <div class="eshop-section section">        <div class="container">        <h2>Products</h2>            <input type="text" ng-model="currentCat" value="" />   <div class="row" ng-cxloak ng-mxodel="currentCat" ng-sxxhow="currentCat != ''">            <ul class="nav nav-tabs">              <li role="presentation" ng-class="{active: activeCat('all')}">                <a ng-click="setCat('all')">All</a>              </li>              <li ng-repeat="cat in cats" role="presentation" ng-class="{active: activeCat(cat)}">                <a ng-click="setCat(cat)">{{cat | capitalize}}</a>              </li>            </ul>          </div>          <div class="row" ng-clxoak ng-shxow="currentCat">           <div ng-repeat="product in products | filter:currentCat" class="col-md-3 col-sm-6">   <div class="shop-item">   <div class="shop-item-image">   <a href="page-product-details.html">                    <img ng-show="product.img" class="img-responsive img-rounded" src="{{product.img}}">                    <img ng-hide="product.img" class="img-responsive img-rounded" src="img/mPurpose-logo.png">                  </a>   </div>   <div class="title">   <h3><a href="page-product-details.html">{{product.item}}</a></h3>   </div>   <div class="price">   {{product.price}} '{{product.category}}'   </div>   <div class="actions">   </div>   </div>   </div>  </div>   </div> And this is the filter in the app.js file: //  $scope.currentCat = "all";  $scope.activeCat = function(cat) {    return ($scope.currentCat && cat == $scope.currentCat);  };  $scope.setCat = function(cat) {    $scope.currentCat = cat;  };  $scope.isCat = function(cat) {    return ($scope.currentCat =='all' || cat == $scope.currentCat);  };});

 
And lastly a screenshot of the firbase I am pulling the data from.   
bc948340e0.png

Edited by upliftsleet1974
code tags :)

CPU Ryzen 5 Asrock B350 Pro 4 / MSI RX580 Gaming / RAM 16 Gigs Corsair Vengeance 3000 / HDD 1TB Seagate Barracuda / SSD Samsung 840 120GB / 500GB Samsung SSD / Case Urban S31 / PSU EVGA G2 750w / Os Windows 10 / Keyboard Corsair K70 / Mouse Razer Naga 2013 (Won it from Linus!!

Link to comment
Share on other sites

Link to post
Share on other sites

Did not know I could use that to highlight the code. Thank you mod.

CPU Ryzen 5 Asrock B350 Pro 4 / MSI RX580 Gaming / RAM 16 Gigs Corsair Vengeance 3000 / HDD 1TB Seagate Barracuda / SSD Samsung 840 120GB / 500GB Samsung SSD / Case Urban S31 / PSU EVGA G2 750w / Os Windows 10 / Keyboard Corsair K70 / Mouse Razer Naga 2013 (Won it from Linus!!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×