Add classes for the comparator page

This commit is contained in:
dario-cfpt
2020-01-28 15:35:52 +01:00
parent 2baa70c2c2
commit f0ed0e519c
5 changed files with 100 additions and 29 deletions

View File

@ -38,6 +38,7 @@ routes = [
}
},
{
name: 'comparator',
path: '/comparator/',
templateUrl: './pages/comparator.html',
on: {
@ -52,7 +53,13 @@ routes = [
// We must use the pageAfterIn event in order to open the smartselect directly
pageAfterIn: (e, page) => {
configureSmartSelectOfCharacters();
}
},
pageBeforeRemove: function (e, page) {
// Reset the classes selected when exiting the page
feData.characters.forEach(char => {
char.idClassSelected = null;
});
},
}
},
{