[ISDK-80] Add a config file for modularisation#40
Open
Conversation
# Conflicts: # src/pages/achievements/view/achievements-view.page.ts # src/pages/activities-classic/list/activities-classic-list.page.ts # src/pages/activities/list/list.page.ts # src/pages/activities/list/popup.ts # src/pages/assessments/assessments.page.ts # src/pages/assessments/group/assessments-group.page.ts # src/pages/assessments/popup/items-popup.page.ts # src/pages/events/checkin/event-checkin.page.ts # src/pages/events/list/list.page.ts # src/pages/events/view/events-view.page.ts # src/pages/forget-password/forget-password.ts # src/pages/gallery/gallery.ts # src/pages/levels/list/list.ts # src/pages/login/login.ts # src/pages/magic-link/magic-link.ts # src/pages/rankings/list/rankings.page.ts # src/pages/rankings/view/ranking-badges.ts # src/pages/rankings/view/ranking-details.page.ts # src/pages/registration/register.page.ts # src/pages/registration/registration.page.ts # src/pages/reset-password/reset-password.ts # src/pages/settings/leaderboard/leaderboard-settings.page.ts # src/pages/settings/settings.page.ts # src/pages/team/team.ts # src/pages/term-condition/term-condition.page.ts
…/ISDK-80/modularisation
# Conflicts: # src/pages/assessments/assessments.page.ts # src/pages/assessments/group/assessments-group.page.ts
Contributor
Author
|
@jazzmind the changed files that related to this ticket are:
|
imkven
commented
Nov 13, 2017
| self.cacheService.setLocal('timelineID', data.Timelines[0].Timeline.id); | ||
| self.cacheService.setLocal('teams', data.Teams); | ||
| self.cacheService.setLocal('gotNewItems', false); | ||
| self.cacheService.setLocal('appConfig', data.Experience.config || {}); |
Contributor
Author
There was a problem hiding this comment.
When user login, we take out the config and save into local storage. @jazzmind
| import * as _ from 'lodash'; | ||
|
|
||
| @Injectable() | ||
| export class AppConfigService { |
Contributor
Author
There was a problem hiding this comment.
Those are the code to handle AppConfig for the user. @jazzmind
| ) {} | ||
|
|
||
| ionViewWillEnter() { | ||
| this.tabs = this.appConfig.getTabs(); |
Contributor
Author
There was a problem hiding this comment.
Here we assign the tabs for render later. @jazzmind
| <ion-tab tabsHideOnSubPages="true" [root]="events" tabTitle=" {{ 'TABS.EVENTS' | translate }}" tabIcon="md-calendar"></ion-tab> | ||
| <ion-tab tabsHideOnSubPages="true" [root]="ranking" tabTitle=" {{ 'TABS.RANKING' | translate }}" tabIcon="md-medal"></ion-tab> | ||
| <ion-tab tabsHideOnSubPages="true" [root]="settings" tabTitle=" {{ 'TABS.ACCOUNT' | translate }}" tabIcon="md-person"></ion-tab> | ||
| <ion-tab *ngFor="let tab of tabs" tabsHideOnSubPages="true" [root]="tab.root" tabTitle=" {{ tab.title | translate }}" tabIcon="{{tab.icon}}"></ion-tab> |
Contributor
Author
There was a problem hiding this comment.
No more hardcoded tabs. The tabs will render based on AppConfig data. @jazzmind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://intersective.atlassian.net/browse/ISDK-80