Home Блог App modificators

App modificators

App modificators

Additive modifiers are recognized for expanding the functionality and working for a similar logic with OpenCart modifiers and adding modifiers in the project root, without a detailed description.

Unlike OpenCart modifiers that work with XML, ocionic modifiers work with JSON. For complete certainty, we will leave you with one example:

modificators/demo.json
[
{
"file": "app/catalog/product-list/product-list.page.html",
"operations": [
{
"pattern": "</ion-content>",
"content": "<div>{{ hello_text }}</div>",
"position": "after"
}
]
},
{
"file": "app/catalog/product-list/product-list.page.ts",
"operations": [
{
"pattern": "public selectedSort = \"\"",
"content": "public hello_text = \"Всем привет!\"",
"position": "after"
},
{
"pattern": "public selectedSort = \"\"",
"content": "public bye_text = \"Всем Пока!\"",
"position": "after"
}
]
}
]

To update the modifiers, use the command and follow the prompts:

node ocionic.js

Write a review

Write a review


Ask a question

Ask a question