Creating a shopping list by using “Checklist-model” and “dirPagination”












0















I would like to make a shopping website by using AngularJS (version:1.6.6)



I used "checklist-model" and "angularUtils.directivces.dirPagination" directives for development.



I am facing the problem that I would like to create a product list with category functions. For example, the products will be categorized into three category(i.e. Cat-A, Cat-B and Cat-C).



I used checklist-model to implement three check boxes which hold the value of the three category, however, how can I filter the product list according to the selected check box?



Examples:
If "Cat-A" and "Cat-B" is checked, the result filter out all the non-related product(i.e. Cat-C products)



Here is some of my coding:



<div class="col-12 col-lg-4" dir-paginate="item in datas|filter:select.types|itemsPerPage:3">
<div>
<!--The product details-->
</div>
</div>


The following is about the category check boxes:



<div>Type</div>
<hr>
<div ng-repeat="t in type">
<label style="font-size: 0.9vw;padding-left: 1vw;">
<input type="checkbox" checklist-model="select.types" checklist-value="t"> {{t}}
</label>
</div>

<script>
$scope.select={
targets:,
types:
};
</script>


The datas example:



[{"id":"22","p_name":"P3","p_cat":"Cat-C","p_detail":"--","p_price":"333","image":"5bf7f65e8818f.png","created":"2018-11-23 12:45:18","modified":"2018-11-23 12:45:18"},{"id":"24","p_name":"P2","p_cat":"Cat-B","p_detail":"--","p_price":"123","image":"5bfa20ad35a7d.PNG","created":"2018-11-25 04:10:21","modified":"2018-11-25 04:10:21"},{"id":"25","p_name":"P1","p_cat":"Cat-A","p_detail":"--","p_price":"1","image":"5bfa20b7c1c48.PNG","created":"2018-11-25 04:10:31","modified":"2018-11-25 04:10:31"}]


Sorry for the poor explanation. Hope someone can help me!










share|improve this question

























  • Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

    – Ajay
    Nov 26 '18 at 8:30
















0















I would like to make a shopping website by using AngularJS (version:1.6.6)



I used "checklist-model" and "angularUtils.directivces.dirPagination" directives for development.



I am facing the problem that I would like to create a product list with category functions. For example, the products will be categorized into three category(i.e. Cat-A, Cat-B and Cat-C).



I used checklist-model to implement three check boxes which hold the value of the three category, however, how can I filter the product list according to the selected check box?



Examples:
If "Cat-A" and "Cat-B" is checked, the result filter out all the non-related product(i.e. Cat-C products)



Here is some of my coding:



<div class="col-12 col-lg-4" dir-paginate="item in datas|filter:select.types|itemsPerPage:3">
<div>
<!--The product details-->
</div>
</div>


The following is about the category check boxes:



<div>Type</div>
<hr>
<div ng-repeat="t in type">
<label style="font-size: 0.9vw;padding-left: 1vw;">
<input type="checkbox" checklist-model="select.types" checklist-value="t"> {{t}}
</label>
</div>

<script>
$scope.select={
targets:,
types:
};
</script>


The datas example:



[{"id":"22","p_name":"P3","p_cat":"Cat-C","p_detail":"--","p_price":"333","image":"5bf7f65e8818f.png","created":"2018-11-23 12:45:18","modified":"2018-11-23 12:45:18"},{"id":"24","p_name":"P2","p_cat":"Cat-B","p_detail":"--","p_price":"123","image":"5bfa20ad35a7d.PNG","created":"2018-11-25 04:10:21","modified":"2018-11-25 04:10:21"},{"id":"25","p_name":"P1","p_cat":"Cat-A","p_detail":"--","p_price":"1","image":"5bfa20b7c1c48.PNG","created":"2018-11-25 04:10:31","modified":"2018-11-25 04:10:31"}]


Sorry for the poor explanation. Hope someone can help me!










share|improve this question

























  • Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

    – Ajay
    Nov 26 '18 at 8:30














0












0








0


0






I would like to make a shopping website by using AngularJS (version:1.6.6)



I used "checklist-model" and "angularUtils.directivces.dirPagination" directives for development.



I am facing the problem that I would like to create a product list with category functions. For example, the products will be categorized into three category(i.e. Cat-A, Cat-B and Cat-C).



I used checklist-model to implement three check boxes which hold the value of the three category, however, how can I filter the product list according to the selected check box?



Examples:
If "Cat-A" and "Cat-B" is checked, the result filter out all the non-related product(i.e. Cat-C products)



Here is some of my coding:



<div class="col-12 col-lg-4" dir-paginate="item in datas|filter:select.types|itemsPerPage:3">
<div>
<!--The product details-->
</div>
</div>


The following is about the category check boxes:



<div>Type</div>
<hr>
<div ng-repeat="t in type">
<label style="font-size: 0.9vw;padding-left: 1vw;">
<input type="checkbox" checklist-model="select.types" checklist-value="t"> {{t}}
</label>
</div>

<script>
$scope.select={
targets:,
types:
};
</script>


The datas example:



[{"id":"22","p_name":"P3","p_cat":"Cat-C","p_detail":"--","p_price":"333","image":"5bf7f65e8818f.png","created":"2018-11-23 12:45:18","modified":"2018-11-23 12:45:18"},{"id":"24","p_name":"P2","p_cat":"Cat-B","p_detail":"--","p_price":"123","image":"5bfa20ad35a7d.PNG","created":"2018-11-25 04:10:21","modified":"2018-11-25 04:10:21"},{"id":"25","p_name":"P1","p_cat":"Cat-A","p_detail":"--","p_price":"1","image":"5bfa20b7c1c48.PNG","created":"2018-11-25 04:10:31","modified":"2018-11-25 04:10:31"}]


Sorry for the poor explanation. Hope someone can help me!










share|improve this question
















I would like to make a shopping website by using AngularJS (version:1.6.6)



I used "checklist-model" and "angularUtils.directivces.dirPagination" directives for development.



I am facing the problem that I would like to create a product list with category functions. For example, the products will be categorized into three category(i.e. Cat-A, Cat-B and Cat-C).



I used checklist-model to implement three check boxes which hold the value of the three category, however, how can I filter the product list according to the selected check box?



Examples:
If "Cat-A" and "Cat-B" is checked, the result filter out all the non-related product(i.e. Cat-C products)



Here is some of my coding:



<div class="col-12 col-lg-4" dir-paginate="item in datas|filter:select.types|itemsPerPage:3">
<div>
<!--The product details-->
</div>
</div>


The following is about the category check boxes:



<div>Type</div>
<hr>
<div ng-repeat="t in type">
<label style="font-size: 0.9vw;padding-left: 1vw;">
<input type="checkbox" checklist-model="select.types" checklist-value="t"> {{t}}
</label>
</div>

<script>
$scope.select={
targets:,
types:
};
</script>


The datas example:



[{"id":"22","p_name":"P3","p_cat":"Cat-C","p_detail":"--","p_price":"333","image":"5bf7f65e8818f.png","created":"2018-11-23 12:45:18","modified":"2018-11-23 12:45:18"},{"id":"24","p_name":"P2","p_cat":"Cat-B","p_detail":"--","p_price":"123","image":"5bfa20ad35a7d.PNG","created":"2018-11-25 04:10:21","modified":"2018-11-25 04:10:21"},{"id":"25","p_name":"P1","p_cat":"Cat-A","p_detail":"--","p_price":"1","image":"5bfa20b7c1c48.PNG","created":"2018-11-25 04:10:31","modified":"2018-11-25 04:10:31"}]


Sorry for the poor explanation. Hope someone can help me!







angularjs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 10:08







YPFighter

















asked Nov 25 '18 at 10:00









YPFighterYPFighter

85




85













  • Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

    – Ajay
    Nov 26 '18 at 8:30



















  • Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

    – Ajay
    Nov 26 '18 at 8:30

















Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

– Ajay
Nov 26 '18 at 8:30





Check link https://stackoverflow.com/questions/53404174/angularjs-doesnt-work-with-multiple-flag/53409051#53409051, you get help from this Thanks

– Ajay
Nov 26 '18 at 8:30












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466421%2fcreating-a-shopping-list-by-using-checklist-model-and-dirpagination%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466421%2fcreating-a-shopping-list-by-using-checklist-model-and-dirpagination%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

To store a contact into the json file from server.js file using a class in NodeJS

Marschland