From 109108cbfc65c20847a7481c4290c579740e808d Mon Sep 17 00:00:00 2001 From: Yash Jipkate <34203227+YashJipkate@users.noreply.github.com> Date: Mon, 1 Jul 2019 12:58:02 +0530 Subject: [PATCH] Introduction to Angular 8 (#7048) * init * Tries * required appinit * Fix some tests * Fix some tests * Fix last remaining e2e * Merge * fix failing tests * fix failing tests * restore karma * multi karma tries * revert multi karma tries * Half way mod try * email dashboard mod * Tries * Clean up and apply workaround * Change name of the combine file * Remove waitforangularenable statement * Remove unwanted difs * Added comments * Review changes * Remove unnecessary additions * Review * Remove extra require * Remove unnecessary change * Remove unnecessary change * Review changes * Necessary changes * Have SHA512 in package-lock * Update comment * Update issues number * Empty commit * Fix tests * Added sha512 * Fix minify plugins --- .eslintrc | 5 +- core/templates/dev/head/App.ts | 2 + core/templates/dev/head/AppInit.ts | 30 ++++- core/templates/dev/head/I18nFooter.ts | 2 + core/templates/dev/head/app.constants.ts | 2 + .../base_components/BaseContentDirective.ts | 2 + .../base_components/WarningLoaderDirective.ts | 2 + .../create-activity-button.directive.ts | 2 + .../exploration-embed-button.service.ts | 2 + .../hint-and-solution-buttons.directive.ts | 2 + .../social-buttons.directive.ts | 2 + .../ck-editor-rte.directive.ts | 2 + .../ck-editor-widgets.initializer.ts | 2 + .../alert-message.directive.ts | 2 + .../attribution-guide.directive.ts | 2 + .../background-banner.directive.ts | 2 + .../common-elements/loading-dots.directive.ts | 2 + .../common-elements/promo-bar.directive.ts | 2 + .../sharing-links.directive.ts | 2 + .../side-navigation-bar.directive.ts | 2 + .../top-navigation-bar.directive.ts | 2 + .../collection-creation.service.ts | 2 + .../exploration-creation.service.ts | 2 + .../question-creation.service.ts | 2 + .../skill-creation.service.ts | 2 + .../story-creation.service.ts | 2 + .../topic-creation.service.ts.ts | 2 + .../apply-validation.directive.ts | 2 + .../audio-file-uploader.directive.ts | 2 + .../html-select.directive.ts | 2 + .../image-uploader.directive.ts | 2 + .../object-editor.directive.ts | 2 + .../require-is-float.directive.ts | 2 + .../select2-dropdown.directive.ts | 2 + ...anslations-as-needing-update.controller.ts | 2 + .../schema-based-bool-editor.directive.ts | 2 + .../schema-based-choices-editor.directive.ts | 2 + .../schema-based-custom-editor.directive.ts | 2 + .../schema-based-dict-editor.directive.ts | 2 + .../schema-based-editor.directive.ts | 2 + ...chema-based-expression-editor.directive.ts | 2 + .../schema-based-float-editor.directive.ts | 2 + .../schema-based-html-editor.directive.ts | 2 + .../schema-based-int-editor.directive.ts | 2 + .../schema-based-list-editor.directive.ts | 2 + .../schema-based-unicode-editor.directive.ts | 2 + .../schema-based-custom-viewer.directive.ts | 2 + .../schema-based-dict-viewer.directive.ts | 2 + .../schema-based-html-viewer.directive.ts | 2 + .../schema-based-list-viewer.directive.ts | 2 + ...schema-based-primitive-viewer.directive.ts | 2 + .../schema-based-unicode-viewer.directive.ts | 2 + .../schema-based-viewer.directive.ts | 2 + .../forms/validators/is-at-least.filter.ts | 2 + .../forms/validators/is-at-most.filter.ts | 2 + .../forms/validators/is-float.filter.ts | 2 + .../forms/validators/is-integer.filter.ts | 2 + .../forms/validators/is-nonempty.filter.ts | 2 + .../graph-services/graph-layout.service.ts | 2 + .../circular-image.directive.ts | 2 + .../profile-link-image.directive.ts | 2 + .../profile-link-text.directive.ts | 2 + .../question-editor.directive.ts | 2 + .../question-player.constants.ts | 3 + .../question-player.directive.ts | 2 + .../services/question-player-state.service.ts | 2 + .../questions-list.directive.ts | 2 + .../rating-computation.service.ts | 2 + .../rating-display.directive.ts | 2 + .../score-ring/score-ring.directive.ts | 2 + .../answer-group-editor.directive.ts | 2 + .../summary-list-header.directive.ts | 2 + .../hint-editor/hint-editor.directive.ts | 2 + .../outcome-destination-editor.directive.ts | 2 + .../outcome-editor.directive.ts | 2 + .../outcome-feedback-editor.directive.ts | 2 + .../response-header.directive.ts | 2 + .../rule-editor/rule-editor.directive.ts | 2 + .../rule-type-selector.directive.ts | 2 + .../solution-editor.directive.ts | 2 + .../solution-explanation-editor.directive.ts | 2 + .../state-content-editor.directive.ts | 2 + .../state-content.service.ts | 2 + .../state-customization-args.service.ts | 2 + .../state-editor.service.ts | 2 + .../state-hints.service.ts | 2 + .../state-interaction-id.service.ts | 2 + .../state-param-changes.service.ts | 2 + .../state-property.service.ts | 2 + .../state-recorded-voiceovers.service.ts | 2 + .../state-solicit-answer-details.service.ts | 2 + .../state-solution.service.ts | 2 + .../state-written-translations.service.ts | 2 + .../state-editor/state-editor.constants.ts | 2 + .../state-editor/state-editor.directive.ts | 2 + .../state-hints-editor.directive.ts | 2 + ...state-interaction-editor.directive.spec.ts | 21 ++- .../state-interaction-editor.directive.ts | 2 + .../state-responses.directive.ts | 2 + .../state-solution-editor.directive.ts | 2 + .../collection-summary-tile.constants.ts | 2 + .../collection-summary-tile.directive.ts | 2 + .../exploration-summary-tile.directive.ts | 2 + .../story-summary-tile.directive.ts | 2 + .../codemirror-mergeview.directive.ts | 2 + .../version-diff-visualization.directive.ts | 2 + .../directives/AngularHtmlBindDirective.ts | 2 + .../dev/head/directives/FocusOnDirective.ts | 2 + .../head/directives/MathjaxBindDirective.ts | 2 + ...AnswerClassificationResultObjectFactory.ts | 2 + .../classifier/ClassifierObjectFactory.ts | 2 + .../PredictionResultObjectFactory.ts | 2 + .../collection/CollectionNodeObjectFactory.ts | 2 + .../collection/CollectionObjectFactory.ts | 2 + .../CollectionPlaythroughObjectFactory.ts | 2 + .../CollectionRightsBackendApiService.ts | 2 + .../CollectionRightsObjectFactory.ts | 2 + .../collection/CollectionUpdateService.ts | 2 + .../collection/CollectionValidationService.ts | 2 + .../EditableCollectionBackendApiService.ts | 2 + .../GuestCollectionProgressObjectFactory.ts | 2 + .../GuestCollectionProgressService.ts | 2 + .../ReadOnlyCollectionBackendApiService.ts | 2 + .../SearchExplorationsBackendApiService.ts | 2 + .../collection/collection-domain.constants.ts | 2 + .../CreatorDashboardBackendApiService.ts | 2 + .../domain/editor/editor-domain.constants.ts | 2 + .../editor/undo_redo/BaseUndoRedoService.ts | 2 + .../editor/undo_redo/ChangeObjectFactory.ts | 2 + .../undo_redo/QuestionUndoRedoService.ts | 2 + .../editor/undo_redo/UndoRedoService.ts | 2 + .../exploration/AnswerGroupObjectFactory.ts | 2 + .../exploration/AnswerStatsObjectFactory.ts | 2 + .../AudioTranslationObjectFactory.ts | 2 + ...tentIdsToAudioTranslationsObjectFactory.ts | 2 + .../EditableExplorationBackendApiService.ts | 2 + .../ExplorationDraftObjectFactory.ts | 2 + .../exploration/ExplorationObjectFactory.ts | 2 + .../domain/exploration/HintObjectFactory.ts | 2 + .../exploration/InteractionObjectFactory.ts | 2 + .../exploration/OutcomeObjectFactory.ts | 2 + .../exploration/ParamChangeObjectFactory.ts | 2 + .../exploration/ParamChangesObjectFactory.ts | 2 + .../exploration/ParamMetadataObjectFactory.ts | 2 + .../exploration/ParamSpecObjectFactory.ts | 2 + .../exploration/ParamSpecsObjectFactory.ts | 2 + .../exploration/ParamTypeObjectFactory.ts | 2 + .../ReadOnlyExplorationBackendApiService.ts | 2 + .../RecordedVoiceoversObjectFactory.ts | 2 + .../domain/exploration/RuleObjectFactory.ts | 2 + .../exploration/SolutionObjectFactory.ts | 2 + .../domain/exploration/StatesObjectFactory.ts | 2 + .../exploration/SubtitledHtmlObjectFactory.ts | 2 + .../exploration/VoiceoverObjectFactory.ts | 2 + .../WrittenTranslationObjectFactory.ts | 2 + .../WrittenTranslationsObjectFactory.ts | 2 + .../FeedbackMessageSummaryObjectFactory.ts | 2 + .../FeedbackThreadObjectFactory.ts | 2 + .../FeedbackThreadSummaryObjectFactory.ts | 2 + ...earnerDashboardActivityIdsObjectFactory.ts | 2 + .../LearnerDashboardBackendApiService.ts | 2 + .../LearnerDashboardIconsDirective.ts | 2 + .../LearnerDashboardIdsBackendApiService.ts | 2 + .../LearnerPlaylistService.ts | 2 + .../domain/objects/FractionObjectFactory.ts | 2 + .../objects/NumberWithUnitsObjectFactory.ts | 2 + .../head/domain/objects/UnitsObjectFactory.ts | 2 + .../objects/objects-domain.constants.ts | 2 + .../EditableQuestionBackendApiService.ts | 2 + .../PretestQuestionBackendApiService.ts | 2 + .../question/QuestionBackendApiService.ts | 2 + .../domain/question/QuestionObjectFactory.ts | 2 + .../domain/question/QuestionUpdateService.ts | 2 + .../question/question-domain.constants.ts | 2 + .../domain/sidebar/SidebarStatusService.ts | 2 + .../skill/ConceptCardBackendApiService.ts | 2 + .../domain/skill/ConceptCardObjectFactory.ts | 2 + .../skill/EditableSkillBackendApiService.ts | 2 + .../skill/MisconceptionObjectFactory.ts | 2 + .../head/domain/skill/SkillObjectFactory.ts | 2 + .../skill/SkillRightsBackendApiService.ts | 2 + .../domain/skill/SkillRightsObjectFactory.ts | 2 + .../domain/skill/SkillSummaryObjectFactory.ts | 2 + .../head/domain/skill/SkillUpdateService.ts | 2 + .../domain/skill/skill-domain.constants.ts | 2 + .../head/domain/state/StateObjectFactory.ts | 2 + .../state_card/StateCardObjectFactory.ts | 2 + .../ImprovementActionButtonObjectFactory.ts | 2 + .../statistics/LearnerActionObjectFactory.ts | 2 + ...PlaythroughImprovementCardObjectFactory.ts | 2 + .../PlaythroughIssueObjectFactory.ts | 2 + .../statistics/PlaythroughObjectFactory.ts | 2 + .../statistics/statistics-domain.constants.ts | 2 + .../story/EditableStoryBackendApiService.ts | 2 + .../story/StoryContentsObjectFactory.ts | 2 + .../domain/story/StoryNodeObjectFactory.ts | 2 + .../head/domain/story/StoryObjectFactory.ts | 2 + .../head/domain/story/StoryUpdateService.ts | 2 + .../domain/story/story-domain.constants.ts | 2 + .../ReadOnlyStoryNodeObjectFactory.ts | 2 + .../StoryPlaythroughObjectFactory.ts | 2 + .../StoryViewerBackendApiService.ts | 2 + .../story-viewer-domain.constants.ts | 2 + .../suggestion/SuggestionObjectFactory.ts | 2 + .../SuggestionThreadObjectFactory.ts | 2 + .../ExplorationSummaryBackendApiService.ts | 2 + .../topic/EditableTopicBackendApiService.ts | 2 + .../domain/topic/SubtopicObjectFactory.ts | 2 + .../SubtopicPageContentsObjectFactory.ts | 2 + .../domain/topic/SubtopicPageObjectFactory.ts | 2 + .../head/domain/topic/TopicObjectFactory.ts | 2 + .../topic/TopicRightsBackendApiService.ts | 2 + .../domain/topic/TopicRightsObjectFactory.ts | 2 + .../head/domain/topic/TopicUpdateService.ts | 2 + .../domain/topic/topic-domain.constants.ts | 2 + .../TopicViewerBackendApiService.ts | 2 + .../topic-viewer-domain.constants.ts | 2 + ...picsAndSkillsDashboardBackendApiService.ts | 2 + ...s-and-skills-dashboard-domain.constants.ts | 2 + .../head/domain/user/UserInfoObjectFactory.ts | 2 + .../utilities/AudioFileObjectFactory.ts | 2 + .../utilities/AudioLanguageObjectFactory.ts | 2 + ...AutogeneratedAudioLanguageObjectFactory.ts | 2 + .../domain/utilities/BrowserCheckerService.ts | 2 + .../FileDownloadRequestObjectFactory.ts | 2 + .../utilities/ImageFileObjectFactory.ts | 2 + .../domain/utilities/LanguageUtilService.ts | 2 + .../utilities/StopwatchObjectFactory.ts | 2 + .../utilities/UrlInterpolationService.ts | 3 + .../expressions/ExpressionEvaluatorService.ts | 2 + .../ExpressionInterpolationService.ts | 2 + .../expressions/ExpressionParserService.js | 2 + .../ExpressionSyntaxTreeService.ts | 2 + .../ExpressionTypeParserService.ts | 2 + .../filters/convert-html-to-unicode.filter.ts | 2 + .../filters/convert-unicode-to-html.filter.ts | 2 + ...vert-unicode-with-params-to-html.filter.ts | 2 + .../head/filters/format-rte-preview.filter.ts | 2 + .../dev/head/filters/format-timer.filter.ts | 2 + .../parameterize-rule-description.filter.ts | 2 + .../remove-duplicates-in-array.filter.ts | 2 + .../camel-case-to-hyphens.filter.ts | 2 + .../capitalize.filter.ts | 2 + .../convert-to-plain-text.filter.ts | 2 + .../get-abbreviated-text.filter.ts | 2 + ...-whitespace-punctuation-and-case.filter.ts | 2 + .../normalize-whitespace.filter.ts | 2 + .../replace-inputs-with-ellipses.filter.ts | 2 + .../truncate-and-capitalize.filter.ts | 2 + .../truncate-at-first-ellipsis.filter.ts | 2 + .../truncate-at-first-line.filter.ts | 2 + .../string-utility-filters/truncate.filter.ts | 2 + .../underscores-to-camel-case.filter.ts | 2 + .../wrap-text-with-ellipsis.filter.ts | 2 + .../summarize-nonnegative-number.filter.ts | 2 + ...based-on-interaction-answer-type.filter.ts | 2 + core/templates/dev/head/pages/Base.ts | 2 + .../dev/head/pages/OppiaFooterDirective.ts | 2 + .../pages/about-page/about-page.controller.ts | 2 + .../pages/about-page/about-page.scripts.ts | 3 +- ...admin-dev-mode-activities-tab.directive.ts | 2 + ...dmin-prod-mode-activities-tab.directive.ts | 2 + .../pages/admin-page/admin-page.constants.ts | 2 + .../pages/admin-page/admin-page.directive.ts | 2 + .../pages/admin-page/admin-page.scripts.ts | 2 + .../config-tab/admin-config-tab.directive.ts | 2 + .../jobs-tab/admin-jobs-tab.directive.ts | 2 + .../misc-tab/admin-misc-tab.directive.ts | 2 + .../navbar/admin-navbar.directive.ts | 2 + .../roles-tab/admin-roles-tab.directive.ts | 2 + .../roles-tab/role-graph.directive.ts | 2 + .../services/admin-router.service.ts | 2 + .../services/admin-task-manager.service.ts | 2 + .../collection-editor-page.constants.ts | 2 + .../collection-editor-page.directive.ts | 2 + .../collection-editor-page.scripts.ts | 2 + .../collection-editor-tab.directive.ts | 2 + .../collection-node-creator.directive.ts | 2 + .../collection-node-editor.directive.ts | 2 + .../collection-history-tab.directive.ts | 2 + ...tion-editor-navbar-breadcrumb.directive.ts | 2 + .../collection-editor-navbar.directive.ts | 2 + .../collection-editor-state.service.ts | 2 + .../services/collection-linearizer.service.ts | 2 + .../collection-details-editor.directive.ts | 2 + .../collection-permissions-card.directive.ts | 2 + .../collection-settings-tab.directive.ts | 2 + .../collection-statistics-tab.directive.ts | 2 + .../collection-footer.directive.ts | 2 + .../collection-local-nav.directive.ts | 2 + .../collection-node-list.directive.ts | 2 + .../collection-player-page.directive.ts | 2 + .../collection-player-page.scripts.ts | 2 + .../contact-page/contact-page.scripts.ts | 2 + .../creator-dashboard-page.constants.ts | 2 + .../creator-dashboard-page.controller.ts | 2 + .../creator-dashboard-page.scripts.ts | 2 + ...ggestion-modal-for-creator-view.service.ts | 2 + .../donate-page/donate-page.controller.ts | 2 + .../pages/donate-page/donate-page.scripts.ts | 2 + .../email-dashboard-data.service.ts | 2 + .../email-dashboard-page.controller.ts | 2 + .../email-dashboard-page.scripts.ts | 2 + .../email-dashboard-result.controller.ts | 2 + .../email-dashboard-result.scripts.ts | 2 + .../error-pages/error-page.controller.ts | 2 + .../pages/error-pages/error-page.scripts.ts | 2 + .../editor-navbar-breadcrumb.directive.ts | 2 + .../editor-navigation.directive.ts | 2 + .../exploration-editor-tab.directive.ts | 2 + .../exploration-graph.directive.ts | 2 + .../state-graph-visualization.directive.ts | 2 + .../services/answer-groups-cache.service.ts | 2 + .../interaction-details-cache.service.ts | 2 + .../editor-tab/services/responses.service.ts | 2 + .../services/solution-validity.service.ts | 2 + .../services/solution-verification.service.ts | 2 + .../state-name-editor.directive.ts | 2 + .../state-param-changes-editor.directive.ts | 2 + .../test-interaction-panel.directive.ts | 2 + .../training-data-editor-panel.service.ts | 2 + .../training-panel/training-data.service.ts | 2 + .../training-panel/training-modal.service.ts | 2 + .../training-panel.directive.ts | 2 + .../unresolved-answers-overview.directive.ts | 2 + .../exploration-editor-page.constants.ts | 2 + .../exploration-editor-page.controller.ts | 2 + .../exploration-editor-page.scripts.ts | 2 + .../exploration-objective-editor.directive.ts | 2 + ...tion-save-and-publish-buttons.directive.ts | 2 + .../exploration-title-editor.directive.ts | 2 + .../feedback-tab/feedback-tab.directive.ts | 2 + .../services/thread-data.service.ts | 2 + .../services/thread-status-display.service.ts | 2 + .../thread-table/thread-table.directive.ts | 2 + .../history-tab/history-tab.directive.ts | 2 + .../services/compare-versions.service.ts | 2 + .../services/version-tree.service.ts | 2 + .../improvements-tab.directive.ts | 2 + .../playthrough-improvement-card.directive.ts | 2 + .../param-changes-editor.directive.ts | 2 + .../value-generator-editor.directive.ts | 2 + .../preview-tab/preview-tab.directive.ts | 2 + .../services/angular-name.service.ts | 2 + .../services/autosave-info-modals.service.ts | 2 + .../services/change-list.service.ts | 2 + .../changes-in-human-readable-form.service.ts | 2 + .../editor-first-time-events.service.ts | 2 + ...ration-automatic-text-to-speech.service.ts | 2 + .../services/exploration-category.service.ts | 2 + ...xploration-correctness-feedback.service.ts | 2 + .../services/exploration-data.service.ts | 2 + .../services/exploration-diff.service.ts | 2 + .../exploration-init-state-name.service.ts | 2 + .../exploration-language-code.service.ts | 2 + .../services/exploration-objective.service.ts | 2 + .../exploration-param-changes.service.ts | 2 + .../exploration-param-specs.service.ts | 2 + .../services/exploration-property.service.ts | 2 + .../services/exploration-rights.service.ts | 2 + .../services/exploration-save.service.ts | 2 + .../services/exploration-states.service.ts | 2 + .../services/exploration-tags.service.ts | 2 + .../services/exploration-title.service.ts | 2 + .../services/exploration-warnings.service.ts | 2 + .../services/graph-data.service.ts | 2 + .../services/parameter-metadata.service.ts | 2 + .../services/router.service.ts | 2 + .../state-tutorial-first-time.service.ts | 2 + .../user-email-preferences.service.ts | 2 + .../settings-tab/settings-tab.directive.ts | 2 + .../charts/bar-chart.directive.ts | 2 + .../charts/pie-chart.directive.ts | 2 + .../cyclic-transitions-issue.directive.ts | 2 + .../issues/early-quit-issue.directive.ts | 2 + .../multiple-incorrect-issue.directive.ts | 2 + .../issues/playthrough-issues.directive.ts | 2 + .../services/learner-action-render.service.ts | 2 + .../state-improvement-suggestion.service.ts | 2 + .../statistics-tab.directive.ts | 2 + ...on-modal-for-exploration-editor.service.ts | 2 + .../audio-translation-bar.directive.ts | 2 + .../services/translation-language.service.ts | 2 + .../services/translation-status.service.ts | 2 + ...anslation-tab-active-content-id.service.ts | 2 + .../translation-tab-active-mode.service.ts | 2 + .../services/voiceover-recording.service.ts | 2 + .../state-translation-editor.directive.ts | 2 + ...tate-translation-status-graph.directive.ts | 2 + .../state-translation.directive.ts | 2 + .../translation-tab.directive.ts | 2 + .../translator-overview.directive.ts | 2 + .../exploration-player-page.constants.ts | 2 + .../exploration-player-page.controller.ts | 2 + .../exploration-player-page.scripts.ts | 2 + .../layout-directives/audio-bar.directive.ts | 2 + .../correctness-footer.directive.ts | 2 + .../exploration-footer.directive.ts | 2 + .../feedback-popup.directive.ts | 2 + .../learner-local-nav.directive.ts | 2 + .../learner-view-info.directive.ts | 2 + .../progress-nav.directive.ts | 2 + .../continue-button.directive.ts | 2 + .../conversation-skin.directive.ts | 2 + .../input-response-pair.directive.ts | 2 + .../supplemental-card.directive.ts | 2 + .../tutor-card.directive.ts | 2 + .../services/answer-classification.service.ts | 2 + .../services/audio-preloader.service.ts | 2 + .../audio-translation-language.service.ts | 2 + .../audio-translation-manager.service.ts | 2 + .../services/current-interaction.service.ts | 2 + .../services/exploration-engine.service.ts | 2 + .../exploration-player-state.service.ts | 2 + .../exploration-recommendations.service.ts | 2 + ...ract-image-filenames-from-state.service.ts | 2 + .../services/fatigue-detection.service.ts | 2 + .../hint-and-solution-modal.service.ts | 2 + .../hints-and-solution-manager.service.ts | 2 + .../services/image-preloader.service.ts | 2 + .../services/learner-params.service.ts | 2 + .../services/learner-view-rating.service.ts | 2 + .../services/number-attempts.service.ts | 2 + ...er-correctness-feedback-enabled.service.ts | 2 + .../services/player-position.service.ts | 2 + .../services/player-transcript.service.ts | 2 + .../prediction-algorithm-registry.service.ts | 2 + .../question-player-engine.service.ts | 2 + ...-exploration-confirmation-modal.service.ts | 2 + .../state-classifier-mapping.service.ts | 2 + .../services/stats-reporting.service.ts | 2 + ...on-modal-for-exploration-player.service.ts | 2 + .../dev/head/pages/footer_js_libs.html | 1 - .../get-started-page.scripts.ts | 2 + .../head/pages/interaction-specs.constants.ts | 2 + .../stewards-landing-page.controller.ts | 2 + .../stewards-landing-page.scripts.ts | 2 + .../topic-landing-page.constants.ts | 2 + .../topic-landing-page.controller.ts | 2 + .../topic-landing-page.scripts.ts | 2 + .../learner-dashboard-page.constants.ts | 2 + .../learner-dashboard-page.controller.ts | 4 + ...ion-modal-for-learner-dashboard.service.ts | 2 + .../library-footer.directive.ts | 2 + .../library-page/library-page.constants.ts | 2 + .../library-page/library-page.directive.ts | 2 + .../library-page/library-page.scripts.ts | 2 + .../search-bar/search-bar.directive.ts | 2 + .../activity-tiles-infinity-grid.directive.ts | 2 + .../search-results.directive.ts | 2 + .../maintenance-page.controller.ts | 4 + .../moderator-page.controller.ts | 2 + .../moderator-page/moderator-page.scripts.ts | 2 + ...notifications-dashboard-page.controller.ts | 2 + .../notifications-dashboard-page.scripts.ts | 2 + .../practice-session-page.constants.ts | 2 + .../practice-session-page.controller.ts | 2 + .../practice-session-page.scripts.ts | 2 + .../preferences-page.controller.ts | 2 + .../preferences-page.scripts.ts | 2 + .../privacy-page/privacy-page.controller.ts | 2 + .../profile-page/profile-page.controller.ts | 2 + .../profile-page/profile-page.scripts.ts | 2 + .../review-test-engine.service.ts | 2 + .../review-test-page.constants.ts | 2 + .../review-test-page.directive.ts | 2 + .../signup-page/signup-page.controller.ts | 2 + .../pages/signup-page/signup-page.scripts.ts | 2 + .../skill-concept-card-editor.directive.ts | 2 + .../worked-example-editor.directive.ts | 2 + .../skill-description-editor.directive.ts | 2 + .../skill-editor-main-tab.directive.ts | 2 + .../misconception-editor.directive.ts | 2 + .../skill-misconceptions-editor.directive.ts | 2 + ...kill-editor-navbar-breadcrumb.directive.ts | 2 + .../navbar/skill-editor-navbar.directive.ts | 2 + .../questions-tab/questions-tab.directive.ts | 2 + .../services/skill-editor-routing.service.ts | 2 + .../services/skill-editor-state.service.ts | 2 + .../skill-editor-page.constants.ts | 2 + .../skill-editor-page.controller.ts | 2 + .../skill-editor-page.scripts.ts | 2 + .../splash-page/splash-page.controller.ts | 2 + .../pages/splash-page/splash-page.scripts.ts | 1 + .../editor-tab/story-editor.directive.ts | 2 + .../editor-tab/story-node-editor.directive.ts | 2 + ...tory-editor-navbar-breadcrumb.directive.ts | 2 + .../navbar/story-editor-navbar.directive.ts | 2 + .../services/story-editor-state.service.ts | 2 + .../story-editor-page.constants.ts | 2 + .../story-editor-page.controller.ts | 2 + .../story-editor-page.scripts.ts | 2 + .../story-viewer-chapters-list.directive.ts | 2 + ...tory-viewer-navbar-breadcrumb.directive.ts | 2 + .../story-viewer-page.directive.ts | 2 + .../story-viewer-page.scripts.ts | 2 + .../pages/teach-page/teach-page.controller.ts | 2 + .../pages/teach-page/teach-page.scripts.ts | 2 + .../pages/terms-page/terms-page.controller.ts | 2 + .../thanks-page/thanks-page.controller.ts | 4 + .../editor-tab/stories-list.directive.ts | 2 + .../editor-tab/topic-editor-tab.directive.ts | 2 + ...opic-editor-navbar-breadcrumb.directive.ts | 2 + .../navbar/topic-editor-navbar.directive.ts | 2 + .../questions-tab/questions-tab.directive.ts | 2 + .../services/topic-editor-routing.service.ts | 2 + .../services/topic-editor-state.service.ts | 2 + .../subtopics-list-tab.directive.ts | 2 + .../topic-editor-page.constants.ts | 2 + .../topic-editor-page.controller.ts | 2 + .../topic-editor-page.scripts.ts | 2 + ...opic-viewer-navbar-breadcrumb.directive.ts | 2 + .../stories-list/stories-list.directive.ts | 2 + .../topic-viewer-page.controller.ts | 2 + .../topic-viewer-page.scripts.ts | 2 + ...s-dashboard-navbar-breadcrumb.directive.ts | 2 + ...s-and-skills-dashboard-navbar.directive.ts | 2 + .../skills-list/skills-list.directive.ts | 2 + .../topic-selector.directive.ts | 2 + ...ics-and-skills-dashboard-page.constants.ts | 2 + ...cs-and-skills-dashboard-page.controller.ts | 10 +- ...opics-and-skills-dashboard-page.scripts.ts | 2 + .../topics-list/topics-list.directive.ts | 2 + .../dev/head/services/AlertsService.ts | 2 + .../head/services/AssetsBackendApiService.ts | 2 + .../dev/head/services/AudioPlayerService.ts | 2 + .../AutogeneratedAudioPlayerService.ts | 2 + .../head/services/AutoplayedVideosService.ts | 2 + .../head/services/CodeNormalizerService.ts | 2 + .../dev/head/services/ComputeGraphService.ts | 2 + .../ConstructTranslationIdsService.ts | 2 + .../dev/head/services/ContextService.ts | 2 + .../head/services/DateTimeFormatService.ts | 2 + .../dev/head/services/DebouncerService.ts | 2 + .../dev/head/services/EditabilityService.ts | 2 + .../ExplorationFeaturesBackendApiService.ts | 2 + .../services/ExplorationFeaturesService.ts | 2 + .../ExplorationHtmlFormatterService.ts | 2 + .../services/ExtensionTagAssemblerService.ts | 2 + .../head/services/GenerateContentIdService.ts | 2 + .../dev/head/services/HtmlEscaperService.ts | 2 + .../dev/head/services/IdGenerationService.ts | 2 + .../head/services/ImprovementCardService.ts | 2 + .../dev/head/services/ImprovementsService.ts | 2 + .../dev/head/services/LocalStorageService.ts | 2 + .../dev/head/services/MessengerService.ts | 2 + .../dev/head/services/NavigationService.ts | 2 + ...ctivesRecursionTimeoutPreventionService.ts | 2 + .../dev/head/services/PageTitleService.ts | 2 + .../PlaythroughIssuesBackendApiService.ts | 2 + .../head/services/PlaythroughIssuesService.ts | 2 + .../dev/head/services/PlaythroughService.ts | 2 + .../dev/head/services/PromoBarService.ts | 2 + .../dev/head/services/QuestionsListService.ts | 2 + .../dev/head/services/RteHelperService.ts | 2 + .../services/SchemaDefaultValueService.ts | 2 + .../SchemaUndefinedLastElementService.ts | 2 + .../dev/head/services/SearchService.ts | 2 + .../dev/head/services/SiteAnalyticsService.ts | 2 + .../services/SpeechSynthesisChunkerService.ts | 2 + .../head/services/StateRulesStatsService.ts | 2 + .../StateTopAnswersStatsBackendApiService.ts | 2 + .../services/StateTopAnswersStatsService.ts | 2 + .../head/services/SuggestionModalService.ts | 2 + .../TranslationFileHashLoaderService.ts | 2 + .../dev/head/services/UserService.ts | 2 + .../dev/head/services/UtilsService.ts | 2 + .../dev/head/services/ValidatorsService.ts | 2 + .../services/contextual/DeviceInfoService.ts | 2 + .../head/services/contextual/UrlService.ts | 2 + .../contextual/WindowDimensionsService.ts | 2 + .../dev/head/services/services.constants.ts | 2 + .../stateful/BackgroundMaskService.ts | 2 + .../services/stateful/FocusManagerService.ts | 2 + .../dev/head/tests/FormBuilderTestPage.ts | 4 + .../dev/head/tests/FormOverlayDirective.ts | 4 + .../dev/head/tests/console_errors.html | 13 ++ core/tests/karma.conf.ts | 27 +--- .../classifiers/CountVectorizerService.ts | 2 + .../classifiers/PythonProgramTokenizer.ts | 2 + .../classifiers/SVMPredictionService.ts | 2 + extensions/classifiers/TextInputTokenizer.ts | 2 + .../WinnowingPreprocessingService.ts | 2 + .../classifiers-extension.constants.ts | 2 + .../CodeRepl/CodeReplPredictionService.ts | 2 + .../directives/CodeReplRulesService.ts | 2 + .../directives/CodeReplValidationService.ts | 2 + .../OppiaInteractiveCodeReplDirective.ts | 2 + .../OppiaResponseCodeReplDirective.ts | 2 + .../OppiaShortResponseCodeReplDirective.ts | 2 + .../directives/ContinueRulesService.ts | 2 + .../directives/ContinueValidationService.ts | 2 + .../OppiaInteractiveContinueDirective.ts | 2 + .../OppiaResponseContinueDirective.ts | 2 + .../OppiaShortResponseContinueDirective.ts | 2 + .../DragAndDropSortInputRulesService.ts | 2 + .../DragAndDropSortInputValidationService.ts | 2 + ...nteractiveDragAndDropSortInputDirective.ts | 2 + ...iaResponseDragAndDropSortInputDirective.ts | 2 + ...rtResponseDragAndDropSortInputDirective.ts | 2 + .../directives/EndExplorationRulesService.ts | 2 + .../EndExplorationValidationService.ts | 2 + ...OppiaInteractiveEndExplorationDirective.ts | 2 + .../OppiaResponseEndExplorationDirective.ts | 2 + ...piaShortResponseEndExplorationDirective.ts | 2 + .../directives/FractionInputRulesService.ts | 2 + .../FractionInputValidationService.ts | 2 + .../OppiaInteractiveFractionInputDirective.ts | 2 + .../OppiaResponseFractionInputDirective.ts | 2 + ...ppiaShortResponseFractionInputDirective.ts | 2 + .../directives/GraphDetailService.ts | 2 + .../directives/GraphInputRulesService.ts | 2 + .../directives/GraphInputValidationService.ts | 2 + .../directives/GraphUtilsService.ts | 2 + .../directives/GraphVizDirective.ts | 2 + .../OppiaInteractiveGraphInputDirective.ts | 2 + .../OppiaResponseGraphInputDirective.ts | 2 + .../OppiaShortResponseGraphInputDirective.ts | 2 + .../directives/ImageClickInputRulesService.ts | 2 + .../ImageClickInputValidationService.ts | 2 + ...ppiaInteractiveImageClickInputDirective.ts | 2 + .../OppiaResponseImageClickInputDirective.ts | 2 + ...iaShortResponseImageClickInputDirective.ts | 2 + .../directives/InteractiveMapRulesService.ts | 2 + .../InteractiveMapValidationService.ts | 2 + ...OppiaInteractiveInteractiveMapDirective.ts | 2 + .../OppiaResponseInteractiveMapDirective.ts | 2 + ...piaShortResponseInteractiveMapDirective.ts | 2 + .../ItemSelectionInputRulesService.ts | 2 + .../ItemSelectionInputValidationService.ts | 2 + ...aInteractiveItemSelectionInputDirective.ts | 2 + ...ppiaResponseItemSelectionInputDirective.ts | 2 + ...hortResponseItemSelectionInputDirective.ts | 2 + .../directives/LogicProofRulesService.ts | 2 + .../directives/LogicProofValidationService.ts | 2 + .../OppiaInteractiveLogicProofDirective.ts | 2 + .../OppiaResponseLogicProofDirective.ts | 2 + .../OppiaShortResponseLogicProofDirective.ts | 2 + .../MathExpressionInputRulesService.ts | 2 + .../MathExpressionInputValidationService.ts | 2 + ...InteractiveMathExpressionInputDirective.ts | 2 + ...piaResponseMathExpressionInputDirective.ts | 2 + ...ortResponseMathExpressionInputDirective.ts | 2 + .../MultipleChoiceInputRulesService.ts | 2 + .../MultipleChoiceInputValidationService.ts | 2 + ...InteractiveMultipleChoiceInputDirective.ts | 2 + ...piaResponseMultipleChoiceInputDirective.ts | 2 + ...ortResponseMultipleChoiceInputDirective.ts | 2 + .../directives/MusicNotesInputRulesService.ts | 2 + .../MusicNotesInputValidationService.ts | 2 + .../directives/MusicPhrasePlayerService.ts | 2 + ...ppiaInteractiveMusicNotesInputDirective.ts | 2 + .../OppiaResponseMusicNotesInputDirective.ts | 2 + ...iaShortResponseMusicNotesInputDirective.ts | 2 + .../directives/NumberWithUnitsRulesService.ts | 2 + .../NumberWithUnitsValidationService.ts | 2 + ...ppiaInteractiveNumberWithUnitsDirective.ts | 2 + .../OppiaResponseNumberWithUnitsDirective.ts | 2 + ...iaShortResponseNumberWithUnitsDirective.ts | 2 + .../directives/NumericInputRulesService.ts | 2 + .../NumericInputValidationService.ts | 2 + .../OppiaInteractiveNumericInputDirective.ts | 2 + .../OppiaResponseNumericInputDirective.ts | 2 + ...OppiaShortResponseNumericInputDirective.ts | 2 + ...piaInteractivePencilCodeEditorDirective.ts | 2 + .../OppiaResponsePencilCodeEditorDirective.ts | 2 + ...aShortResponsePencilCodeEditorDirective.ts | 2 + .../PencilCodeEditorRulesService.ts | 2 + .../PencilCodeEditorValidationService.ts | 2 + .../OppiaInteractiveSetInputDirective.ts | 2 + .../OppiaResponseSetInputDirective.ts | 2 + .../OppiaShortResponseSetInputDirective.ts | 2 + .../directives/SetInputRulesService.ts | 2 + .../directives/SetInputValidationService.ts | 2 + .../TextInput/TextInputPredictionService.ts | 2 + .../OppiaInteractiveTextInputDirective.ts | 2 + .../OppiaResponseTextInputDirective.ts | 2 + .../OppiaShortResponseTextInputDirective.ts | 2 + .../directives/TextInputRulesService.ts | 2 + .../directives/TextInputValidationService.ts | 2 + .../baseInteractionValidationService.ts | 2 + .../interactions-extension.constants.ts | 2 + .../templates/BooleanEditorDirective.ts | 2 + .../templates/CodeStringEditorDirective.ts | 2 + .../templates/CoordTwoDimEditorDirective.ts | 2 + .../DragAndDropHtmlStringEditorDirective.ts | 2 + .../DragAndDropPositiveIntEditorDirective.ts | 2 + .../templates/FilepathEditorDirective.ts | 2 + .../templates/FractionEditorDirective.ts | 2 + .../objects/templates/GraphEditorDirective.ts | 2 + .../templates/GraphPropertyEditorDirective.ts | 2 + .../objects/templates/HtmlEditorDirective.ts | 2 + .../ImageWithRegionsEditorDirective.ts | 2 + .../objects/templates/IntEditorDirective.ts | 2 + .../ListOfSetsOfHtmlStringsEditorDirective.ts | 2 + .../templates/ListOfTabsEditorDirective.ts | 2 + .../ListOfUnicodeStringEditorDirective.ts | 2 + .../LogicErrorCategoryEditorDirective.ts | 2 + .../templates/LogicQuestionEditorDirective.ts | 2 + .../MathLatexStringEditorDirective.ts | 2 + .../templates/MusicPhraseEditorDirective.ts | 2 + .../NonnegativeIntEditorDirective.ts | 2 + .../NormalizedStringEditorDirective.ts | 2 + .../NumberWithUnitsEditorDirective.ts | 2 + .../templates/ParameterNameEditorDirective.ts | 2 + .../objects/templates/RealEditorDirective.ts | 2 + .../templates/SanitizedUrlEditorDirective.ts | 2 + .../SetOfHtmlStringEditorDirective.ts | 2 + .../SetOfUnicodeStringEditorDirective.ts | 2 + .../templates/UnicodeStringEditorDirective.ts | 2 + ...OppiaNoninteractiveCollapsibleDirective.ts | 2 + .../OppiaNoninteractiveImageDirective.ts | 2 + .../OppiaNoninteractiveLinkDirective.ts | 2 + .../OppiaNoninteractiveMathDirective.ts | 2 + .../OppiaNoninteractiveTabsDirective.ts | 2 + .../OppiaNoninteractiveVideoDirective.ts | 2 + .../templates/CopierDirective.ts | 2 + .../templates/RandomSelectorDirective.ts | 2 + .../OppiaVisualizationBarChartDirective.ts | 2 + ...zationEnumeratedFrequencyTableDirective.ts | 2 + ...piaVisualizationFrequencyTableDirective.ts | 2 + package-lock.json | 122 ++++++++++++++++-- package.json | 20 ++- scripts/run_frontend_tests.sh | 11 ++ tsconfig.json | 5 +- webpack.config.ts | 48 ++++--- webpack.dev.config.ts | 7 +- webpack.prod.config.ts | 7 +- 728 files changed, 1690 insertions(+), 77 deletions(-) diff --git a/.eslintrc b/.eslintrc index 031f52ec4df4..e6a35c2ce3fb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,10 @@ { "parser": "@typescript-eslint/parser", + "parserOptions": { + "sourceType": "module" + }, "extends": [ - "eslint:recommended", + "eslint:recommended" ], "plugins": [ "angular", diff --git a/core/templates/dev/head/App.ts b/core/templates/dev/head/App.ts index 63164b8e0f9e..244c9ea77387 100644 --- a/core/templates/dev/head/App.ts +++ b/core/templates/dev/head/App.ts @@ -68,6 +68,8 @@ require('app.constants.ts'); // loaded after app.constants.ts require('I18nFooter.ts'); +var oppia = require('AppInit.ts').module; + oppia.config([ '$compileProvider', '$cookiesProvider', '$httpProvider', '$interpolateProvider', '$locationProvider', diff --git a/core/templates/dev/head/AppInit.ts b/core/templates/dev/head/AppInit.ts index b011fa28e4c9..60a4b670c07c 100644 --- a/core/templates/dev/head/AppInit.ts +++ b/core/templates/dev/head/AppInit.ts @@ -16,11 +16,39 @@ * @fileoverview File for initializing the main oppia module. */ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { StaticProvider } from '@angular/core'; + +@NgModule({ + imports: [ + BrowserModule + ] +}) +class MainAngularModule { + // Empty placeholder method to satisfy the `Compiler`. + ngDoBootstrap() {} +} + +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { downgradeModule } from '@angular/upgrade/static'; + +const bootstrapFn = (extraProviders: StaticProvider[]) => { + const platformRef = platformBrowserDynamic(extraProviders); + return platformRef.bootstrapModule(MainAngularModule); +}; +const downgradedModule = downgradeModule(bootstrapFn); + +declare var angular: any; + var oppia = angular.module( 'oppia', [ 'dndLists', 'headroom', 'infinite-scroll', 'ngAnimate', 'ngAudio', 'ngCookies', 'ngImgCrop', 'ngJoyRide', 'ngMaterial', 'ngResource', 'ngSanitize', 'ngTouch', 'pascalprecht.translate', - 'toastr', 'ui.bootstrap', 'ui.sortable', 'ui.tree', 'ui.validate' + 'toastr', 'ui.bootstrap', 'ui.sortable', 'ui.tree', 'ui.validate', + downgradedModule ].concat( window.GLOBALS ? (window.GLOBALS.ADDITIONAL_ANGULAR_MODULES || []) : [])); + +exports.module = oppia; diff --git a/core/templates/dev/head/I18nFooter.ts b/core/templates/dev/head/I18nFooter.ts index 025295ffda85..89a01f7602bb 100755 --- a/core/templates/dev/head/I18nFooter.ts +++ b/core/templates/dev/head/I18nFooter.ts @@ -18,6 +18,8 @@ * @author milagro.teruel@gmail.com (Milagro Teruel) */ +var oppia = require('AppInit.ts').module; + oppia.controller('I18nFooter', [ '$cookies', '$http', '$rootScope', '$scope', '$timeout', '$translate', 'UserService', diff --git a/core/templates/dev/head/app.constants.ts b/core/templates/dev/head/app.constants.ts index 50ef7fac7173..38efec231200 100644 --- a/core/templates/dev/head/app.constants.ts +++ b/core/templates/dev/head/app.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Shared constants for the Oppia module. */ +var oppia = require('AppInit.ts').module; + for (var constantName in constants) { oppia.constant(constantName, constants[constantName]); } diff --git a/core/templates/dev/head/base_components/BaseContentDirective.ts b/core/templates/dev/head/base_components/BaseContentDirective.ts index 8b65b476778c..e4b97c8498e7 100644 --- a/core/templates/dev/head/base_components/BaseContentDirective.ts +++ b/core/templates/dev/head/base_components/BaseContentDirective.ts @@ -20,6 +20,8 @@ require('pages/OppiaFooterDirective.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('baseContent', [ 'UrlInterpolationService', function(UrlInterpolationService) { diff --git a/core/templates/dev/head/base_components/WarningLoaderDirective.ts b/core/templates/dev/head/base_components/WarningLoaderDirective.ts index 13be100ac353..6765eadde1a9 100644 --- a/core/templates/dev/head/base_components/WarningLoaderDirective.ts +++ b/core/templates/dev/head/base_components/WarningLoaderDirective.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('warningLoader', [ 'UrlInterpolationService', function(UrlInterpolationService) { diff --git a/core/templates/dev/head/components/button-directives/create-activity-button.directive.ts b/core/templates/dev/head/components/button-directives/create-activity-button.directive.ts index 374d660f4702..1167c77556cd 100644 --- a/core/templates/dev/head/components/button-directives/create-activity-button.directive.ts +++ b/core/templates/dev/head/components/button-directives/create-activity-button.directive.ts @@ -23,6 +23,8 @@ require('services/contextual/UrlService.ts'); require('services/SiteAnalyticsService.ts'); require('services/UserService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('createActivityButton', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/button-directives/exploration-embed-button.service.ts b/core/templates/dev/head/components/button-directives/exploration-embed-button.service.ts index 56efeaec1732..7d3ae62ccc80 100644 --- a/core/templates/dev/head/components/button-directives/exploration-embed-button.service.ts +++ b/core/templates/dev/head/components/button-directives/exploration-embed-button.service.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SiteAnalyticsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationEmbedButtonService', [ '$uibModal', 'SiteAnalyticsService', 'UrlInterpolationService', function($uibModal, SiteAnalyticsService, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/button-directives/hint-and-solution-buttons.directive.ts b/core/templates/dev/head/components/button-directives/hint-and-solution-buttons.directive.ts index e19b5344a7d0..95493c9e8af6 100644 --- a/core/templates/dev/head/components/button-directives/hint-and-solution-buttons.directive.ts +++ b/core/templates/dev/head/components/button-directives/hint-and-solution-buttons.directive.ts @@ -31,6 +31,8 @@ require('services/contextual/DeviceInfoService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('hintAndSolutionButtons', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/button-directives/social-buttons.directive.ts b/core/templates/dev/head/components/button-directives/social-buttons.directive.ts index 4ba9ed5f1002..389673a033c8 100644 --- a/core/templates/dev/head/components/button-directives/social-buttons.directive.ts +++ b/core/templates/dev/head/components/button-directives/social-buttons.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('socialButtons', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/ck-editor-helpers/ck-editor-rte.directive.ts b/core/templates/dev/head/components/ck-editor-helpers/ck-editor-rte.directive.ts index 0c97abc15489..40f5a11dc688 100644 --- a/core/templates/dev/head/components/ck-editor-helpers/ck-editor-rte.directive.ts +++ b/core/templates/dev/head/components/ck-editor-helpers/ck-editor-rte.directive.ts @@ -19,6 +19,8 @@ require('services/ContextService.ts'); require('services/RteHelperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('ckEditorRte', [ 'ContextService', 'RteHelperService', 'PAGE_CONTEXT', function(ContextService, RteHelperService, PAGE_CONTEXT) { diff --git a/core/templates/dev/head/components/ck-editor-helpers/ck-editor-widgets.initializer.ts b/core/templates/dev/head/components/ck-editor-helpers/ck-editor-widgets.initializer.ts index 9f09df2d6a39..9a913e344b9d 100644 --- a/core/templates/dev/head/components/ck-editor-helpers/ck-editor-widgets.initializer.ts +++ b/core/templates/dev/head/components/ck-editor-helpers/ck-editor-widgets.initializer.ts @@ -21,6 +21,8 @@ require('rich_text_components/richTextComponentsRequires.ts'); require('services/HtmlEscaperService.ts'); require('services/RteHelperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.run([ '$timeout', '$compile', '$rootScope', '$uibModal', 'RteHelperService', 'HtmlEscaperService', diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/alert-message.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/alert-message.directive.ts index 3af9e8b0470e..389cd863cdc0 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/alert-message.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/alert-message.directive.ts @@ -18,6 +18,8 @@ require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('alertMessage', [function() { return { restrict: 'E', diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/attribution-guide.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/attribution-guide.directive.ts index 662ad37ecdac..2c38f75048da 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/attribution-guide.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/attribution-guide.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/BrowserCheckerService.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('attributionGuide', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/background-banner.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/background-banner.directive.ts index 6f7e7b172632..0f57c54bb9d5 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/background-banner.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/background-banner.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('backgroundBanner', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/loading-dots.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/loading-dots.directive.ts index efb7decb3e64..4c29013c5e3d 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/loading-dots.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/loading-dots.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('loadingDots', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/promo-bar.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/promo-bar.directive.ts index 94e69db9f78a..a93820107658 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/promo-bar.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/promo-bar.directive.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/PromoBarService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('promoBar', [ '$window', 'PromoBarService', 'UrlInterpolationService', function($window, PromoBarService, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/common-layout-directives/common-elements/sharing-links.directive.ts b/core/templates/dev/head/components/common-layout-directives/common-elements/sharing-links.directive.ts index fe4720bf9e4f..69d56dd3c7bd 100644 --- a/core/templates/dev/head/components/common-layout-directives/common-elements/sharing-links.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/common-elements/sharing-links.directive.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); require('services/SiteAnalyticsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('sharingLinks', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/common-layout-directives/navigation-bars/side-navigation-bar.directive.ts b/core/templates/dev/head/components/common-layout-directives/navigation-bars/side-navigation-bar.directive.ts index 4055d065c6f7..92b6b71ee1f4 100644 --- a/core/templates/dev/head/components/common-layout-directives/navigation-bars/side-navigation-bar.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/navigation-bars/side-navigation-bar.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('sideNavigationBar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/common-layout-directives/navigation-bars/top-navigation-bar.directive.ts b/core/templates/dev/head/components/common-layout-directives/navigation-bars/top-navigation-bar.directive.ts index 16783015dad5..7e2098396ef9 100644 --- a/core/templates/dev/head/components/common-layout-directives/navigation-bars/top-navigation-bar.directive.ts +++ b/core/templates/dev/head/components/common-layout-directives/navigation-bars/top-navigation-bar.directive.ts @@ -27,6 +27,8 @@ require('services/UserService.ts'); require('services/contextual/DeviceInfoService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topNavigationBar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/entity-creation-services/collection-creation.service.ts b/core/templates/dev/head/components/entity-creation-services/collection-creation.service.ts index 1c4ca56cb0d4..7b1e19d1f94f 100644 --- a/core/templates/dev/head/components/entity-creation-services/collection-creation.service.ts +++ b/core/templates/dev/head/components/entity-creation-services/collection-creation.service.ts @@ -24,6 +24,8 @@ require('services/SiteAnalyticsService.ts'); // duplicated code between CollectionCreationService and // ExplorationCreationService. +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionCreationService', [ '$http', '$rootScope', '$timeout', '$window', 'AlertsService', 'SiteAnalyticsService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/entity-creation-services/exploration-creation.service.ts b/core/templates/dev/head/components/entity-creation-services/exploration-creation.service.ts index e8e40999eb66..14982f2bcbab 100644 --- a/core/templates/dev/head/components/entity-creation-services/exploration-creation.service.ts +++ b/core/templates/dev/head/components/entity-creation-services/exploration-creation.service.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); require('services/SiteAnalyticsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationCreationService', [ '$http', '$rootScope', '$timeout', '$uibModal', '$window', 'AlertsService', 'SiteAnalyticsService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/entity-creation-services/question-creation.service.ts b/core/templates/dev/head/components/entity-creation-services/question-creation.service.ts index cb4ca180289d..ca3da1c07ea4 100644 --- a/core/templates/dev/head/components/entity-creation-services/question-creation.service.ts +++ b/core/templates/dev/head/components/entity-creation-services/question-creation.service.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionCreationService', [ '$http', '$q', 'UrlInterpolationService', function($http, $q, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/entity-creation-services/skill-creation.service.ts b/core/templates/dev/head/components/entity-creation-services/skill-creation.service.ts index c83eae07e8da..12b74f807b56 100644 --- a/core/templates/dev/head/components/entity-creation-services/skill-creation.service.ts +++ b/core/templates/dev/head/components/entity-creation-services/skill-creation.service.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SkillCreationService', [ '$http', '$rootScope', '$timeout', '$window', 'AlertsService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/entity-creation-services/story-creation.service.ts b/core/templates/dev/head/components/entity-creation-services/story-creation.service.ts index 36b2332f5404..766d351d744b 100644 --- a/core/templates/dev/head/components/entity-creation-services/story-creation.service.ts +++ b/core/templates/dev/head/components/entity-creation-services/story-creation.service.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/topic-editor-page/services/topic-editor-state.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryCreationService', [ '$http', '$rootScope', '$timeout', '$uibModal', '$window', 'AlertsService', 'TopicEditorStateService', 'TopicUpdateService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/entity-creation-services/topic-creation.service.ts.ts b/core/templates/dev/head/components/entity-creation-services/topic-creation.service.ts.ts index a9bd3d3328ad..5d3974b38091 100644 --- a/core/templates/dev/head/components/entity-creation-services/topic-creation.service.ts.ts +++ b/core/templates/dev/head/components/entity-creation-services/topic-creation.service.ts.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicCreationService', [ '$http', '$rootScope', '$timeout', '$uibModal', '$window', 'AlertsService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/apply-validation.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/apply-validation.directive.ts index 989405fa7dfc..fd5ba5102cdf 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/apply-validation.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/apply-validation.directive.ts @@ -19,6 +19,8 @@ require('filters/string-utility-filters/underscores-to-camel-case.filter.ts'); /* eslint-disable angular/directive-restrict */ +var oppia = require('AppInit.ts').module; + oppia.directive('applyValidation', ['$filter', function($filter) { return { require: 'ngModel', diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts index 6d4ff893823f..28f9a6816d47 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/audio-file-uploader.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/IdGenerationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('audioFileUploader', [ 'IdGenerationService', 'UrlInterpolationService', function(IdGenerationService, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/html-select.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/html-select.directive.ts index 067ff680d520..c9dbaa47ce1f 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/html-select.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/html-select.directive.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); // Attribute 'val' is presented to the user. After user selection, the // corresponding attribute 'id' is assigned to 'selection' +var oppia = require('AppInit.ts').module; + oppia.directive('htmlSelect', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts index e583a5d3e534..189c5531e7e0 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/image-uploader.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/IdGenerationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('imageUploader', [ 'IdGenerationService', 'UrlInterpolationService', function(IdGenerationService, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/object-editor.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/object-editor.directive.ts index 165547bde8ff..8ae0c0b47ebf 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/object-editor.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/object-editor.directive.ts @@ -18,6 +18,8 @@ // Individual object editor directives are in extensions/objects/templates. +var oppia = require('AppInit.ts').module; + oppia.directive('objectEditor', ['$compile', '$log', function($compile, $log) { return { scope: { diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/require-is-float.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/require-is-float.directive.ts index 1fc59509dbc5..332909a25242 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/require-is-float.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/require-is-float.directive.ts @@ -22,6 +22,8 @@ require('components/forms/validators/is-float.filter.ts'); /* eslint-disable angular/directive-restrict */ +var oppia = require('AppInit.ts').module; + oppia.directive('requireIsFloat', ['$filter', function($filter) { return { require: 'ngModel', diff --git a/core/templates/dev/head/components/forms/custom-forms-directives/select2-dropdown.directive.ts b/core/templates/dev/head/components/forms/custom-forms-directives/select2-dropdown.directive.ts index bae49b72a1e1..05c54686eeb2 100644 --- a/core/templates/dev/head/components/forms/custom-forms-directives/select2-dropdown.directive.ts +++ b/core/templates/dev/head/components/forms/custom-forms-directives/select2-dropdown.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('select2Dropdown', [ 'UrlInterpolationService', function(UrlInterpolationService) { // Directive for incorporating select2 dropdowns. diff --git a/core/templates/dev/head/components/forms/forms-templates/mark-all-audio-and-translations-as-needing-update.controller.ts b/core/templates/dev/head/components/forms/forms-templates/mark-all-audio-and-translations-as-needing-update.controller.ts index 5481f102af45..dd9018433eab 100644 --- a/core/templates/dev/head/components/forms/forms-templates/mark-all-audio-and-translations-as-needing-update.controller.ts +++ b/core/templates/dev/head/components/forms/forms-templates/mark-all-audio-and-translations-as-needing-update.controller.ts @@ -17,6 +17,8 @@ * mark_all_audio_and_translations_as_needing_update modal. */ +var oppia = require('AppInit.ts').module; + oppia.controller('MarkAllAudioAndTranslationsAsNeedingUpdateController', [ '$scope', '$uibModalInstance', function($scope, $uibModalInstance) { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-bool-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-bool-editor.directive.ts index 6ed9b6b90a04..680e7d58b613 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-bool-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-bool-editor.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedBoolEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-choices-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-choices-editor.directive.ts index fefeac72b1f2..fe29565c193f 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-choices-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-choices-editor.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedChoicesEditor', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-custom-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-custom-editor.directive.ts index 5c68c09c407e..3c7c4e717d8b 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-custom-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-custom-editor.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedCustomEditor', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-dict-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-dict-editor.directive.ts index f87b32a54f41..4f57da46448a 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-dict-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-dict-editor.directive.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/IdGenerationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedDictEditor', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-editor.directive.ts index 69807df781c1..28cbf72998e8 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-editor.directive.ts @@ -45,6 +45,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-expression-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-expression-editor.directive.ts index 3fbbf9b437b6..5f756b07b1a8 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-expression-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-expression-editor.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedExpressionEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-float-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-float-editor.directive.ts index bd8bc23b1ca5..eab6d4c56385 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-float-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-float-editor.directive.ts @@ -20,6 +20,8 @@ require('components/forms/validators/is-float.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedFloatEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-html-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-html-editor.directive.ts index 3cfab6553687..e3ed6bcfdccb 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-html-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-html-editor.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedHtmlEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-int-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-int-editor.directive.ts index b062213677c2..a3810e842655 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-int-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-int-editor.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedIntEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-list-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-list-editor.directive.ts index e446f9b59de5..1797a7db6bd4 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-list-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-list-editor.directive.ts @@ -26,6 +26,8 @@ require('services/SchemaDefaultValueService.ts'); require('services/SchemaUndefinedLastElementService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedListEditor', [ 'FocusManagerService', 'IdGenerationService', 'NestedDirectivesRecursionTimeoutPreventionService', diff --git a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-unicode-editor.directive.ts b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-unicode-editor.directive.ts index 207f180d1209..60b878788dec 100644 --- a/core/templates/dev/head/components/forms/schema-based-editors/schema-based-unicode-editor.directive.ts +++ b/core/templates/dev/head/components/forms/schema-based-editors/schema-based-unicode-editor.directive.ts @@ -20,6 +20,8 @@ require('filters/convert-unicode-with-params-to-html.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/contextual/DeviceInfoService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedUnicodeEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-custom-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-custom-viewer.directive.ts index 5f6013821542..3d98a768ae5a 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-custom-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-custom-viewer.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedCustomViewer', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-dict-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-dict-viewer.directive.ts index 1c310f13990d..c8db4da49a52 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-dict-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-dict-viewer.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedDictViewer', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-html-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-html-viewer.directive.ts index e800e14270b6..cd1b5f3a55ba 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-html-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-html-viewer.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedHtmlViewer', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-list-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-list-viewer.directive.ts index 714fb1829670..b5b022c04c42 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-list-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-list-viewer.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/NestedDirectivesRecursionTimeoutPreventionService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedListViewer', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-primitive-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-primitive-viewer.directive.ts index 9fef83d51bbf..0a982d56c069 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-primitive-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-primitive-viewer.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedPrimitiveViewer', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-unicode-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-unicode-viewer.directive.ts index 855f08c6e8a1..9103e29fdffb 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-unicode-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-unicode-viewer.directive.ts @@ -19,6 +19,8 @@ require('filters/convert-unicode-with-params-to-html.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedUnicodeViewer', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/schema-viewers/schema-based-viewer.directive.ts b/core/templates/dev/head/components/forms/schema-viewers/schema-based-viewer.directive.ts index 5cc1bb945e0a..8f82023735f2 100644 --- a/core/templates/dev/head/components/forms/schema-viewers/schema-based-viewer.directive.ts +++ b/core/templates/dev/head/components/forms/schema-viewers/schema-based-viewer.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('schemaBasedViewer', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/forms/validators/is-at-least.filter.ts b/core/templates/dev/head/components/forms/validators/is-at-least.filter.ts index 789c1ed10046..67c621c91e3c 100644 --- a/core/templates/dev/head/components/forms/validators/is-at-least.filter.ts +++ b/core/templates/dev/head/components/forms/validators/is-at-least.filter.ts @@ -17,6 +17,8 @@ args. */ +var oppia = require('AppInit.ts').module; + oppia.filter('isAtLeast', [function() { return function(input, args) { return (input >= args.minValue); diff --git a/core/templates/dev/head/components/forms/validators/is-at-most.filter.ts b/core/templates/dev/head/components/forms/validators/is-at-most.filter.ts index 79be9f3a79b2..3938c2572814 100644 --- a/core/templates/dev/head/components/forms/validators/is-at-most.filter.ts +++ b/core/templates/dev/head/components/forms/validators/is-at-most.filter.ts @@ -17,6 +17,8 @@ args. */ +var oppia = require('AppInit.ts').module; + oppia.filter('isAtMost', [function() { return function(input, args) { return (input <= args.maxValue); diff --git a/core/templates/dev/head/components/forms/validators/is-float.filter.ts b/core/templates/dev/head/components/forms/validators/is-float.filter.ts index 3ef52f590b34..f5cf900e7421 100644 --- a/core/templates/dev/head/components/forms/validators/is-float.filter.ts +++ b/core/templates/dev/head/components/forms/validators/is-float.filter.ts @@ -16,6 +16,8 @@ * @fileoverview Validator to check if input is float. */ +var oppia = require('AppInit.ts').module; + oppia.filter('isFloat', [function() { return function(input) { var FLOAT_REGEXP = /(?=.*\d)^\-?\d*(\.|\,)?\d*\%?$/; diff --git a/core/templates/dev/head/components/forms/validators/is-integer.filter.ts b/core/templates/dev/head/components/forms/validators/is-integer.filter.ts index 1c6968e5bb5a..4e727303dabe 100644 --- a/core/templates/dev/head/components/forms/validators/is-integer.filter.ts +++ b/core/templates/dev/head/components/forms/validators/is-integer.filter.ts @@ -16,6 +16,8 @@ * @fileoverview Validator to check if input is integer. */ +var oppia = require('AppInit.ts').module; + oppia.filter('isInteger', [function() { return function(input) { return Number.isInteger(Number(input)); diff --git a/core/templates/dev/head/components/forms/validators/is-nonempty.filter.ts b/core/templates/dev/head/components/forms/validators/is-nonempty.filter.ts index 473bc1a54095..0f4a023dc8ac 100644 --- a/core/templates/dev/head/components/forms/validators/is-nonempty.filter.ts +++ b/core/templates/dev/head/components/forms/validators/is-nonempty.filter.ts @@ -16,6 +16,8 @@ * @fileoverview Validator to check if input is nonempty. */ +var oppia = require('AppInit.ts').module; + oppia.filter('isNonempty', [function() { return function(input) { return Boolean(input); diff --git a/core/templates/dev/head/components/graph-services/graph-layout.service.ts b/core/templates/dev/head/components/graph-services/graph-layout.service.ts index b639ec9fb744..5fdc1e0b62f9 100644 --- a/core/templates/dev/head/components/graph-services/graph-layout.service.ts +++ b/core/templates/dev/head/components/graph-services/graph-layout.service.ts @@ -17,6 +17,8 @@ */ // Service for computing layout of state graph nodes. +var oppia = require('AppInit.ts').module; + oppia.factory('StateGraphLayoutService', [ '$filter', '$log', 'MAX_NODES_PER_ROW', function($filter, $log, MAX_NODES_PER_ROW) { diff --git a/core/templates/dev/head/components/profile-link-directives/circular-image.directive.ts b/core/templates/dev/head/components/profile-link-directives/circular-image.directive.ts index 083dccfc4ab1..045d9604b7ef 100644 --- a/core/templates/dev/head/components/profile-link-directives/circular-image.directive.ts +++ b/core/templates/dev/head/components/profile-link-directives/circular-image.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('circularImage', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/profile-link-directives/profile-link-image.directive.ts b/core/templates/dev/head/components/profile-link-directives/profile-link-image.directive.ts index fbce35ac3c64..39443a25f527 100644 --- a/core/templates/dev/head/components/profile-link-directives/profile-link-image.directive.ts +++ b/core/templates/dev/head/components/profile-link-directives/profile-link-image.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('profileLinkImage', [ 'UrlInterpolationService', 'SYSTEM_USER_IDS', function(UrlInterpolationService, SYSTEM_USER_IDS) { diff --git a/core/templates/dev/head/components/profile-link-directives/profile-link-text.directive.ts b/core/templates/dev/head/components/profile-link-directives/profile-link-text.directive.ts index 32417913e52b..a10e5bee20e1 100644 --- a/core/templates/dev/head/components/profile-link-directives/profile-link-text.directive.ts +++ b/core/templates/dev/head/components/profile-link-directives/profile-link-text.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('profileLinkText', [ 'UrlInterpolationService', 'SYSTEM_USER_IDS', function(UrlInterpolationService, SYSTEM_USER_IDS) { diff --git a/core/templates/dev/head/components/question-directives/question-editor/question-editor.directive.ts b/core/templates/dev/head/components/question-directives/question-editor/question-editor.directive.ts index 4337d58edc8c..c2039308f001 100644 --- a/core/templates/dev/head/components/question-directives/question-editor/question-editor.directive.ts +++ b/core/templates/dev/head/components/question-directives/question-editor/question-editor.directive.ts @@ -37,6 +37,8 @@ require('services/EditabilityService.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('questionEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/question-directives/question-player/question-player.constants.ts b/core/templates/dev/head/components/question-directives/question-player/question-player.constants.ts index d13de734bf5d..ebebbf829a17 100644 --- a/core/templates/dev/head/components/question-directives/question-player/question-player.constants.ts +++ b/core/templates/dev/head/components/question-directives/question-player/question-player.constants.ts @@ -15,5 +15,8 @@ /** * @fileoverview Constants for the question player directive. */ + +var oppia = require('AppInit.ts').module; + oppia.constant('HASH_PARAM', 'question-player-result='); oppia.constant('MAX_SCORE_PER_QUESTION', 1.0); diff --git a/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts b/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts index b86e24aba9d2..ed41ba7a0d76 100644 --- a/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts +++ b/core/templates/dev/head/components/question-directives/question-player/question-player.directive.ts @@ -106,6 +106,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('questionPlayer', [ '$http', 'UrlInterpolationService', function( diff --git a/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.ts b/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.ts index aed156a74d2d..22a0d66cc036 100644 --- a/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.ts +++ b/core/templates/dev/head/components/question-directives/question-player/services/question-player-state.service.ts @@ -17,6 +17,8 @@ * in the test session. */ +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionPlayerStateService', [ function() { var questionPlayerState = {}; diff --git a/core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts b/core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts index 84488aa1912d..2ce065a33a9d 100644 --- a/core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts +++ b/core/templates/dev/head/components/question-directives/questions-list/questions-list.directive.ts @@ -37,6 +37,8 @@ require( require('services/AlertsService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('questionsList', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.ts b/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.ts index 8a6099bceb20..596b3ce29db1 100644 --- a/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.ts +++ b/core/templates/dev/head/components/ratings/rating-computation/rating-computation.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service for computing the average rating. */ +var oppia = require('AppInit.ts').module; + oppia.factory('RatingComputationService', [function() { var areRatingsShown = function(ratingFrequencies) { var MINIMUM_ACCEPTABLE_NUMBER_OF_RATINGS = 1; diff --git a/core/templates/dev/head/components/ratings/rating-display/rating-display.directive.ts b/core/templates/dev/head/components/ratings/rating-display/rating-display.directive.ts index 1baa8f7d932f..c402274b9cd1 100644 --- a/core/templates/dev/head/components/ratings/rating-display/rating-display.directive.ts +++ b/core/templates/dev/head/components/ratings/rating-display/rating-display.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('ratingDisplay', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/score-ring/score-ring.directive.ts b/core/templates/dev/head/components/score-ring/score-ring.directive.ts index 27ac62cc3098..6a3ed7efd2fa 100644 --- a/core/templates/dev/head/components/score-ring/score-ring.directive.ts +++ b/core/templates/dev/head/components/score-ring/score-ring.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for the animated score ring. */ +var oppia = require('AppInit.ts').module; + oppia.directive('scoreRing', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/answer-group-editor/answer-group-editor.directive.ts b/core/templates/dev/head/components/state-directives/answer-group-editor/answer-group-editor.directive.ts index 0ea08263d54a..6ee82f68b875 100644 --- a/core/templates/dev/head/components/state-directives/answer-group-editor/answer-group-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/answer-group-editor/answer-group-editor.directive.ts @@ -36,6 +36,8 @@ require( 'state-property.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('answerGroupEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/answer-group-editor/summary-list-header.directive.ts b/core/templates/dev/head/components/state-directives/answer-group-editor/summary-list-header.directive.ts index d4789fb4e577..71598b94c3c9 100644 --- a/core/templates/dev/head/components/state-directives/answer-group-editor/summary-list-header.directive.ts +++ b/core/templates/dev/head/components/state-directives/answer-group-editor/summary-list-header.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('summaryListHeader', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/hint-editor/hint-editor.directive.ts b/core/templates/dev/head/components/state-directives/hint-editor/hint-editor.directive.ts index c890f49e1be9..0e116db44559 100644 --- a/core/templates/dev/head/components/state-directives/hint-editor/hint-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/hint-editor/hint-editor.directive.ts @@ -26,6 +26,8 @@ require( 'state-property.service.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('hintEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-destination-editor.directive.ts b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-destination-editor.directive.ts index d6af3f2dc76a..62b981d77fb6 100644 --- a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-destination-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-destination-editor.directive.ts @@ -27,6 +27,8 @@ require('services/EditabilityService.ts'); require('services/UserService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('outcomeDestinationEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-editor.directive.ts b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-editor.directive.ts index 512905961a79..09016fd3ce30 100644 --- a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-editor.directive.ts @@ -24,6 +24,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('outcomeEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-feedback-editor.directive.ts b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-feedback-editor.directive.ts index 9c471b5e005b..e2557c740d23 100644 --- a/core/templates/dev/head/components/state-directives/outcome-editor/outcome-feedback-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/outcome-editor/outcome-feedback-editor.directive.ts @@ -19,6 +19,8 @@ require('domain/exploration/SubtitledHtmlObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('outcomeFeedbackEditor', [ 'SubtitledHtmlObjectFactory', 'UrlInterpolationService', function(SubtitledHtmlObjectFactory, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/state-directives/response-header/response-header.directive.ts b/core/templates/dev/head/components/state-directives/response-header/response-header.directive.ts index 06835d7cd1ee..579c2726eb20 100644 --- a/core/templates/dev/head/components/state-directives/response-header/response-header.directive.ts +++ b/core/templates/dev/head/components/state-directives/response-header/response-header.directive.ts @@ -25,6 +25,8 @@ require( 'state-property.service.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('responseHeader', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/rule-editor/rule-editor.directive.ts b/core/templates/dev/head/components/state-directives/rule-editor/rule-editor.directive.ts index 963ba0afabd4..d2ba349b0ef8 100644 --- a/core/templates/dev/head/components/state-directives/rule-editor/rule-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/rule-editor/rule-editor.directive.ts @@ -33,6 +33,8 @@ require('services/ValidatorsService.ts'); // to a rule. It also includes 'Cancel' and 'Save Answer' buttons which call // respective 'onCancelRuleEdit' and 'onSaveRule' callbacks when called. These // buttons only show up if 'isEditingRuleInline' is true. +var oppia = require('AppInit.ts').module; + oppia.directive('ruleEditor', [ '$log', 'UrlInterpolationService', function($log, UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-directives/rule-editor/rule-type-selector.directive.ts b/core/templates/dev/head/components/state-directives/rule-editor/rule-type-selector.directive.ts index ea4af88e7446..609b9d5d1ecd 100644 --- a/core/templates/dev/head/components/state-directives/rule-editor/rule-type-selector.directive.ts +++ b/core/templates/dev/head/components/state-directives/rule-editor/rule-type-selector.directive.ts @@ -23,6 +23,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('ruleTypeSelector', [function() { return { restrict: 'E', diff --git a/core/templates/dev/head/components/state-directives/solution-editor/solution-editor.directive.ts b/core/templates/dev/head/components/state-directives/solution-editor/solution-editor.directive.ts index d7ee485ff52d..404f9ffaff93 100644 --- a/core/templates/dev/head/components/state-directives/solution-editor/solution-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/solution-editor/solution-editor.directive.ts @@ -36,6 +36,8 @@ require('services/AlertsService.ts'); require('services/ContextService.ts'); require('services/ExplorationHtmlFormatterService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('solutionEditor', [ '$uibModal', 'AlertsService', 'ContextService', 'ExplorationHtmlFormatterService', 'SolutionObjectFactory', diff --git a/core/templates/dev/head/components/state-directives/solution-editor/solution-explanation-editor.directive.ts b/core/templates/dev/head/components/state-directives/solution-editor/solution-explanation-editor.directive.ts index d1ca16293466..9cf8be42ba87 100644 --- a/core/templates/dev/head/components/state-directives/solution-editor/solution-explanation-editor.directive.ts +++ b/core/templates/dev/head/components/state-directives/solution-editor/solution-explanation-editor.directive.ts @@ -22,6 +22,8 @@ require( 'state-property.service.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('solutionExplanationEditor', [ 'StateSolutionService', 'UrlInterpolationService', function(StateSolutionService, UrlInterpolationService) { diff --git a/core/templates/dev/head/components/state-editor/state-content-editor/state-content-editor.directive.ts b/core/templates/dev/head/components/state-editor/state-content-editor/state-content-editor.directive.ts index f69182fbde56..0149ba0de22d 100644 --- a/core/templates/dev/head/components/state-editor/state-content-editor/state-content-editor.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-content-editor/state-content-editor.directive.ts @@ -28,6 +28,8 @@ require( 'state-property.service.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateContentEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-content.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-content.service.ts index 896511a14c9d..204092414db9 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-content.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-content.service.ts @@ -17,6 +17,8 @@ */ // TODO(sll): Add validation. +var oppia = require('AppInit.ts').module; + oppia.factory('StateContentService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-customization-args.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-customization-args.service.ts index 655ad6107e00..750fa1399823 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-customization-args.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-customization-args.service.ts @@ -19,6 +19,8 @@ */ // TODO(sll): Add validation. +var oppia = require('AppInit.ts').module; + oppia.factory('StateCustomizationArgsService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts index fa57d4664e9b..38e94641d841 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-editor.service.ts @@ -21,6 +21,8 @@ require( 'pages/exploration-editor-page/editor-tab/services/' + 'solution-validity.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateEditorService', [ '$log', 'SolutionValidityService', function( diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-hints.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-hints.service.ts index 28ee3d3d6676..442d2dd36411 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-hints.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-hints.service.ts @@ -16,6 +16,8 @@ * @fileoverview A data service that stores the current interaction hints. */ +var oppia = require('AppInit.ts').module; + oppia.factory('StateHintsService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-interaction-id.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-interaction-id.service.ts index 90caa071f30a..bc05a2b0585c 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-interaction-id.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-interaction-id.service.ts @@ -17,6 +17,8 @@ */ // TODO(sll): Add validation. +var oppia = require('AppInit.ts').module; + oppia.factory('StateInteractionIdService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-param-changes.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-param-changes.service.ts index d25f284aa52a..2cf446e7043f 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-param-changes.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-param-changes.service.ts @@ -18,6 +18,8 @@ */ // TODO(sll): Add validation. +var oppia = require('AppInit.ts').module; + oppia.factory('StateParamChangesService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.ts index cd38b6841ecb..edba44594ea9 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-property.service.ts @@ -18,6 +18,8 @@ require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StatePropertyService', [ '$log', 'AlertsService', function($log, AlertsService) { diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-recorded-voiceovers.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-recorded-voiceovers.service.ts index a8a220a743c0..9cbe67e2314f 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-recorded-voiceovers.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-recorded-voiceovers.service.ts @@ -21,6 +21,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateRecordedVoiceoversService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solicit-answer-details.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solicit-answer-details.service.ts index a11d0098bf2c..2a7af98a24f5 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solicit-answer-details.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solicit-answer-details.service.ts @@ -20,6 +20,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateSolicitAnswerDetailsService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solution.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solution.service.ts index da5676acc666..976e7ebf0549 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solution.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-solution.service.ts @@ -16,6 +16,8 @@ * @fileoverview A data service that stores the current interaction solution. */ +var oppia = require('AppInit.ts').module; + oppia.factory('StateSolutionService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-written-translations.service.ts b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-written-translations.service.ts index 7951b7ab52f5..46ce1a1b2324 100644 --- a/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-written-translations.service.ts +++ b/core/templates/dev/head/components/state-editor/state-editor-properties-services/state-written-translations.service.ts @@ -16,6 +16,8 @@ * @fileoverview A data service that stores the written translations. */ +var oppia = require('AppInit.ts').module; + oppia.factory('StateWrittenTranslationsService', [ 'StatePropertyService', function(StatePropertyService) { var child = Object.create(StatePropertyService); diff --git a/core/templates/dev/head/components/state-editor/state-editor.constants.ts b/core/templates/dev/head/components/state-editor/state-editor.constants.ts index ec0879218fc2..0a5feb08472f 100644 --- a/core/templates/dev/head/components/state-editor/state-editor.constants.ts +++ b/core/templates/dev/head/components/state-editor/state-editor.constants.ts @@ -16,5 +16,7 @@ * @fileoverview Constants for the state editor directive. */ +var oppia = require('AppInit.ts').module; + oppia.constant('INFO_MESSAGE_SOLUTION_IS_INVALID_FOR_QUESTION', 'The current solution does not correspond to a correct answer.'); diff --git a/core/templates/dev/head/components/state-editor/state-editor.directive.ts b/core/templates/dev/head/components/state-editor/state-editor.directive.ts index b132cb6e734d..5ab024e3d6c1 100644 --- a/core/templates/dev/head/components/state-editor/state-editor.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-editor.directive.ts @@ -42,6 +42,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-solicit-answer-details.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-editor/state-hints-editor/state-hints-editor.directive.ts b/core/templates/dev/head/components/state-editor/state-hints-editor/state-hints-editor.directive.ts index 134b00e0e4d6..c3d97a85cf22 100644 --- a/core/templates/dev/head/components/state-editor/state-hints-editor/state-hints-editor.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-hints-editor/state-hints-editor.directive.ts @@ -39,6 +39,8 @@ require('services/AlertsService.ts'); require('services/EditabilityService.ts'); require('services/GenerateContentIdService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateHintsEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts index c923da7a4ba0..9081e2e06c69 100644 --- a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts +++ b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.spec.ts @@ -16,6 +16,10 @@ * @fileoverview Unit tests for the controller of 'State Interactions'. */ +require( + 'pages/exploration-editor-page/editor-tab/' + + 'exploration-editor-tab.directive.ts'); + require('pages/exploration-editor-page/services/change-list.service.ts'); require('pages/exploration-editor-page/services/exploration-states.service.ts'); require( @@ -58,6 +62,8 @@ describe('State Interaction controller', function() { var $httpBackend; var mockExplorationData; var outerScope, directiveScope; + var $componentController; + var stateEditorCtrl; beforeEach(angular.mock.module('directiveTemplates')); beforeEach(function() { @@ -72,7 +78,9 @@ describe('State Interaction controller', function() { }); beforeEach(angular.mock.inject(function( - $compile, $controller, $injector, $rootScope, $templateCache) { + _$componentController_, $compile, $controller, $injector, $rootScope, + $templateCache) { + $componentController = _$componentController_; scope = $rootScope.$new(); ecs = $injector.get('StateEditorService'); cls = $injector.get('ChangeListService'); @@ -188,8 +196,7 @@ describe('State Interaction controller', function() { } }); - var stateEditorCtrl = $controller('ExplorationEditorTab', { - $scope: scope, + stateEditorCtrl = $componentController('explorationEditorTab', { StateEditorService: ecs, ChangeListService: cls, ExplorationStatesService: ess, @@ -199,7 +206,7 @@ describe('State Interaction controller', function() { } }, INTERACTION_SPECS: IS - }); + }, {}); var templateHtml = $templateCache.get( '/pages/exploration_editor/editor_tab/' + @@ -228,7 +235,7 @@ describe('State Interaction controller', function() { it('should keep non-empty content when setting a terminal interaction', function() { ecs.setActiveStateName('First State'); - scope.initStateEditor(); + stateEditorCtrl.initStateEditor(); var state = ess.getState('First State'); scs.init('First State', state.content); @@ -250,7 +257,7 @@ describe('State Interaction controller', function() { it('should change to default text when adding a terminal interaction', function() { ecs.setActiveStateName('End State'); - scope.initStateEditor(); + stateEditorCtrl.initStateEditor(); var state = ess.getState('End State'); scs.init('End State', state.content); @@ -272,7 +279,7 @@ describe('State Interaction controller', function() { it('should not default text when adding a non-terminal interaction', function() { ecs.setActiveStateName('End State'); - scope.initStateEditor(); + stateEditorCtrl.initStateEditor(); var state = ess.getState('End State'); siis.init( diff --git a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.ts b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.ts index 3add7ee417b9..20525b29a590 100644 --- a/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-interaction-editor/state-interaction-editor.directive.ts @@ -49,6 +49,8 @@ require('services/EditabilityService.ts'); require('services/ExplorationHtmlFormatterService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateInteractionEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-editor/state-responses-editor/state-responses.directive.ts b/core/templates/dev/head/components/state-editor/state-responses-editor/state-responses.directive.ts index bbe50e2ddc17..ab3d2dfc044a 100644 --- a/core/templates/dev/head/components/state-editor/state-responses-editor/state-responses.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-responses-editor/state-responses.directive.ts @@ -67,6 +67,8 @@ require('services/ExplorationHtmlFormatterService.ts'); require('services/GenerateContentIdService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateResponses', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/state-editor/state-solution-editor/state-solution-editor.directive.ts b/core/templates/dev/head/components/state-editor/state-solution-editor/state-solution-editor.directive.ts index 2ae91912f089..dc4c5223e764 100644 --- a/core/templates/dev/head/components/state-editor/state-solution-editor/state-solution-editor.directive.ts +++ b/core/templates/dev/head/components/state-editor/state-solution-editor/state-solution-editor.directive.ts @@ -58,6 +58,8 @@ require('services/GenerateContentIdService.ts'); require('components/state-editor/state-editor.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateSolutionEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/summary-tile/collection-summary-tile.constants.ts b/core/templates/dev/head/components/summary-tile/collection-summary-tile.constants.ts index 354558494c7a..9136fcb2152a 100644 --- a/core/templates/dev/head/components/summary-tile/collection-summary-tile.constants.ts +++ b/core/templates/dev/head/components/summary-tile/collection-summary-tile.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for summary tile for collections. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'COLLECTION_VIEWER_URL', '/collection/'); oppia.constant( diff --git a/core/templates/dev/head/components/summary-tile/collection-summary-tile.directive.ts b/core/templates/dev/head/components/summary-tile/collection-summary-tile.directive.ts index dd63bf00ccf4..dcb74c535164 100644 --- a/core/templates/dev/head/components/summary-tile/collection-summary-tile.directive.ts +++ b/core/templates/dev/head/components/summary-tile/collection-summary-tile.directive.ts @@ -25,6 +25,8 @@ require('services/UserService.ts'); require('components/summary-tile/collection-summary-tile.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionSummaryTile', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/summary-tile/exploration-summary-tile.directive.ts b/core/templates/dev/head/components/summary-tile/exploration-summary-tile.directive.ts index 405b9b130a07..166ec56a0a7c 100644 --- a/core/templates/dev/head/components/summary-tile/exploration-summary-tile.directive.ts +++ b/core/templates/dev/head/components/summary-tile/exploration-summary-tile.directive.ts @@ -29,6 +29,8 @@ require('services/UserService.ts'); require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationSummaryTile', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/summary-tile/story-summary-tile.directive.ts b/core/templates/dev/head/components/summary-tile/story-summary-tile.directive.ts index 975b1b87a888..0e8967b36b7d 100644 --- a/core/templates/dev/head/components/summary-tile/story-summary-tile.directive.ts +++ b/core/templates/dev/head/components/summary-tile/story-summary-tile.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storySummaryTile', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/components/version-diff-visualization/codemirror-mergeview.directive.ts b/core/templates/dev/head/components/version-diff-visualization/codemirror-mergeview.directive.ts index fb890bd939c9..a5a88d57b763 100644 --- a/core/templates/dev/head/components/version-diff-visualization/codemirror-mergeview.directive.ts +++ b/core/templates/dev/head/components/version-diff-visualization/codemirror-mergeview.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for the codemirror mergeview component. */ +var oppia = require('AppInit.ts').module; + oppia.directive('codemirrorMergeview', [ function() { return { diff --git a/core/templates/dev/head/components/version-diff-visualization/version-diff-visualization.directive.ts b/core/templates/dev/head/components/version-diff-visualization/version-diff-visualization.directive.ts index dacd0d887c97..535fb101daa7 100644 --- a/core/templates/dev/head/components/version-diff-visualization/version-diff-visualization.directive.ts +++ b/core/templates/dev/head/components/version-diff-visualization/version-diff-visualization.directive.ts @@ -23,6 +23,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('versionDiffVisualization', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/directives/AngularHtmlBindDirective.ts b/core/templates/dev/head/directives/AngularHtmlBindDirective.ts index 0be0132a4418..3bf3095a82ae 100644 --- a/core/templates/dev/head/directives/AngularHtmlBindDirective.ts +++ b/core/templates/dev/head/directives/AngularHtmlBindDirective.ts @@ -20,6 +20,8 @@ // HTML bind directive that trusts the value it is given and also evaluates // custom directive tags in the provided value. +var oppia = require('AppInit.ts').module; + oppia.directive('angularHtmlBind', ['$compile', function($compile) { return { restrict: 'E', diff --git a/core/templates/dev/head/directives/FocusOnDirective.ts b/core/templates/dev/head/directives/FocusOnDirective.ts index bb709e2edc50..a69f58588465 100644 --- a/core/templates/dev/head/directives/FocusOnDirective.ts +++ b/core/templates/dev/head/directives/FocusOnDirective.ts @@ -18,6 +18,8 @@ * NB: Reusable component directives should go in the components/ folder. */ +var oppia = require('AppInit.ts').module; + // When set as an attr of an element, moves focus to that element // when a 'focusOn' event is broadcast. oppia.directive('focusOn', [ diff --git a/core/templates/dev/head/directives/MathjaxBindDirective.ts b/core/templates/dev/head/directives/MathjaxBindDirective.ts index 8ef77e34bae6..0c972bdc2a33 100644 --- a/core/templates/dev/head/directives/MathjaxBindDirective.ts +++ b/core/templates/dev/head/directives/MathjaxBindDirective.ts @@ -18,6 +18,8 @@ * NB: Reusable component directives should go in the components/ folder. */ +var oppia = require('AppInit.ts').module; + oppia.directive('mathjaxBind', [function() { return { restrict: 'E', diff --git a/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactory.ts b/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactory.ts index 53e4dfd5acc8..e6af6985e072 100644 --- a/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactory.ts +++ b/core/templates/dev/head/domain/classifier/AnswerClassificationResultObjectFactory.ts @@ -17,6 +17,8 @@ * Classification Result domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AnswerClassificationResultObjectFactory', [function() { var AnswerClassificationResult = function( outcome, answerGroupIndex, ruleIndex, classificationCategorization) { diff --git a/core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts b/core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts index 9ce1a43421dd..dbb5412a2c46 100644 --- a/core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts +++ b/core/templates/dev/head/domain/classifier/ClassifierObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ClassifierObjectFactory', [function() { var Classifier = function(algorithmId, classifierData, dataSchemaVersion) { this.algorithmId = algorithmId; diff --git a/core/templates/dev/head/domain/classifier/PredictionResultObjectFactory.ts b/core/templates/dev/head/domain/classifier/PredictionResultObjectFactory.ts index a0d7dbe7fd32..ed6ede417196 100644 --- a/core/templates/dev/head/domain/classifier/PredictionResultObjectFactory.ts +++ b/core/templates/dev/head/domain/classifier/PredictionResultObjectFactory.ts @@ -17,6 +17,8 @@ * result domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('PredictionResultObjectFactory', [function() { /** * Stores the prediction result for an answer as returned by the diff --git a/core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts index c1d54d227b2e..5c68c6153556 100644 --- a/core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionNodeObjectFactory.ts @@ -17,6 +17,8 @@ * collection node domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionNodeObjectFactory', [ 'ACTIVITY_STATUS_PRIVATE', function(ACTIVITY_STATUS_PRIVATE) { diff --git a/core/templates/dev/head/domain/collection/CollectionObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionObjectFactory.ts index c0dbf10f7e71..af559fa1818f 100644 --- a/core/templates/dev/head/domain/collection/CollectionObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/collection/CollectionNodeObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionObjectFactory', [ 'CollectionNodeObjectFactory', function(CollectionNodeObjectFactory) { diff --git a/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts index 6c13c7ad889a..7548fa6a64fe 100644 --- a/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionPlaythroughObjectFactory.ts @@ -17,6 +17,8 @@ * collection playthrough domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionPlaythroughObjectFactory', [function() { // TODO(bhenning): Add setters for some of these properties. Setters allow // the collection editor to setup specifically configured playthrough diff --git a/core/templates/dev/head/domain/collection/CollectionRightsBackendApiService.ts b/core/templates/dev/head/domain/collection/CollectionRightsBackendApiService.ts index 47c7d3115536..4803f0adc165 100644 --- a/core/templates/dev/head/domain/collection/CollectionRightsBackendApiService.ts +++ b/core/templates/dev/head/domain/collection/CollectionRightsBackendApiService.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionRightsBackendApiService', [ '$http', '$log', '$q', 'UrlInterpolationService', 'COLLECTION_RIGHTS_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts index 2a7c3f9dc804..923980b33ab5 100644 --- a/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/CollectionRightsObjectFactory.ts @@ -17,6 +17,8 @@ * collection rights domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionRightsObjectFactory', [ function() { var CollectionRights = function(collectionRightsObject) { diff --git a/core/templates/dev/head/domain/collection/CollectionUpdateService.ts b/core/templates/dev/head/domain/collection/CollectionUpdateService.ts index 69115d14ab92..168ac0b48096 100644 --- a/core/templates/dev/head/domain/collection/CollectionUpdateService.ts +++ b/core/templates/dev/head/domain/collection/CollectionUpdateService.ts @@ -25,6 +25,8 @@ require('domain/editor/undo_redo/UndoRedoService.ts'); require('domain/collection/collection-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionUpdateService', [ 'ChangeObjectFactory', 'CollectionNodeObjectFactory', 'UndoRedoService', diff --git a/core/templates/dev/head/domain/collection/CollectionValidationService.ts b/core/templates/dev/head/domain/collection/CollectionValidationService.ts index 083f0c9047ff..acea279734bf 100644 --- a/core/templates/dev/head/domain/collection/CollectionValidationService.ts +++ b/core/templates/dev/head/domain/collection/CollectionValidationService.ts @@ -22,6 +22,8 @@ require( 'pages/collection-editor-page/services/collection-linearizer.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionValidationService', [ 'CollectionLinearizerService', function(CollectionLinearizerService) { diff --git a/core/templates/dev/head/domain/collection/EditableCollectionBackendApiService.ts b/core/templates/dev/head/domain/collection/EditableCollectionBackendApiService.ts index 8418fab8a9db..e34fedb68ce7 100644 --- a/core/templates/dev/head/domain/collection/EditableCollectionBackendApiService.ts +++ b/core/templates/dev/head/domain/collection/EditableCollectionBackendApiService.ts @@ -31,6 +31,8 @@ require('domain/utilities/UrlInterpolationService.ts'); // Discuss and decide whether this is a good approach and then remove this TODO // after deciding and acting upon the decision (which would mean implementing // it if it's agreed upon). +var oppia = require('AppInit.ts').module; + oppia.factory('EditableCollectionBackendApiService', [ '$http', '$q', 'ReadOnlyCollectionBackendApiService', 'UrlInterpolationService', 'COLLECTION_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts index 3a300e03215c..bcb7a5ef38dd 100644 --- a/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts +++ b/core/templates/dev/head/domain/collection/GuestCollectionProgressObjectFactory.ts @@ -17,6 +17,8 @@ * represents the progress of a guest playing through a collection. */ +var oppia = require('AppInit.ts').module; + oppia.factory('GuestCollectionProgressObjectFactory', [ function() { var GuestCollectionProgress = function(completedExplorationsMap) { diff --git a/core/templates/dev/head/domain/collection/GuestCollectionProgressService.ts b/core/templates/dev/head/domain/collection/GuestCollectionProgressService.ts index 69b47a424be5..cc560be8433b 100644 --- a/core/templates/dev/head/domain/collection/GuestCollectionProgressService.ts +++ b/core/templates/dev/head/domain/collection/GuestCollectionProgressService.ts @@ -27,6 +27,8 @@ require('domain/collection/GuestCollectionProgressObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('GuestCollectionProgressService', [ '$window', 'GuestCollectionProgressObjectFactory', function($window, GuestCollectionProgressObjectFactory) { diff --git a/core/templates/dev/head/domain/collection/ReadOnlyCollectionBackendApiService.ts b/core/templates/dev/head/domain/collection/ReadOnlyCollectionBackendApiService.ts index 66bae2d24e7b..0f21fca48b15 100644 --- a/core/templates/dev/head/domain/collection/ReadOnlyCollectionBackendApiService.ts +++ b/core/templates/dev/head/domain/collection/ReadOnlyCollectionBackendApiService.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); // separate CollectionDataService implementation which returns a local copy of // the collection instead. This file should not be included on the page in that // scenario. +var oppia = require('AppInit.ts').module; + oppia.factory('ReadOnlyCollectionBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'COLLECTION_DATA_URL_TEMPLATE', function($http, $q, UrlInterpolationService, COLLECTION_DATA_URL_TEMPLATE) { diff --git a/core/templates/dev/head/domain/collection/SearchExplorationsBackendApiService.ts b/core/templates/dev/head/domain/collection/SearchExplorationsBackendApiService.ts index 010c5a4ec55a..6b0c5ee070dc 100644 --- a/core/templates/dev/head/domain/collection/SearchExplorationsBackendApiService.ts +++ b/core/templates/dev/head/domain/collection/SearchExplorationsBackendApiService.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SearchExplorationsBackendApiService', [ '$http', '$q', 'AlertsService', 'UrlInterpolationService', 'SEARCH_EXPLORATION_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/collection/collection-domain.constants.ts b/core/templates/dev/head/domain/collection/collection-domain.constants.ts index de1e35a8232b..c5134133b0d8 100644 --- a/core/templates/dev/head/domain/collection/collection-domain.constants.ts +++ b/core/templates/dev/head/domain/collection/collection-domain.constants.ts @@ -21,6 +21,8 @@ // backend. // NOTE TO DEVELOPERS: the properties 'prerequisite_skills' and // 'acquired_skills' are deprecated. Do not use them. +var oppia = require('AppInit.ts').module; + oppia.constant('CMD_ADD_COLLECTION_NODE', 'add_collection_node'); oppia.constant('CMD_SWAP_COLLECTION_NODES', 'swap_nodes'); oppia.constant('CMD_DELETE_COLLECTION_NODE', 'delete_collection_node'); diff --git a/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiService.ts b/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiService.ts index b9d254ab7fb9..3c985e9216c7 100644 --- a/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiService.ts +++ b/core/templates/dev/head/domain/creator_dashboard/CreatorDashboardBackendApiService.ts @@ -17,6 +17,8 @@ * backend. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CreatorDashboardBackendApiService', ['$http', function($http) { var _fetchDashboardData = function() { return $http.get('/creatordashboardhandler/data'); diff --git a/core/templates/dev/head/domain/editor/editor-domain.constants.ts b/core/templates/dev/head/domain/editor/editor-domain.constants.ts index b23467ac3e25..6266ae1a25c5 100644 --- a/core/templates/dev/head/domain/editor/editor-domain.constants.ts +++ b/core/templates/dev/head/domain/editor/editor-domain.constants.ts @@ -16,5 +16,7 @@ * @fileoverview Constants for editor domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED', 'undoRedoServiceChangeApplied'); diff --git a/core/templates/dev/head/domain/editor/undo_redo/BaseUndoRedoService.ts b/core/templates/dev/head/domain/editor/undo_redo/BaseUndoRedoService.ts index 60554b3c0bfc..93b0793f71a0 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/BaseUndoRedoService.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/BaseUndoRedoService.ts @@ -24,6 +24,8 @@ require('domain/editor/editor-domain.constants.ts'); * instance of this service exists at a time, so multiple undo/redo stacks are * not currently supported. */ +var oppia = require('AppInit.ts').module; + oppia.factory('BaseUndoRedoService', [ '$rootScope', 'EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED', function($rootScope, EVENT_UNDO_REDO_SERVICE_CHANGE_APPLIED) { diff --git a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts index 45192c6ab64c..da9c4338466d 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/ChangeObjectFactory.ts @@ -21,6 +21,8 @@ // TODO(bhenning): Consolidate the backend ExplorationChange and // CollectionChange domain objects. +var oppia = require('AppInit.ts').module; + oppia.factory('ChangeObjectFactory', [function() { var Change = function( backendChangeObject, applyChangeToObject, reverseChangeToObject) { diff --git a/core/templates/dev/head/domain/editor/undo_redo/QuestionUndoRedoService.ts b/core/templates/dev/head/domain/editor/undo_redo/QuestionUndoRedoService.ts index 835b4dc69db4..f01346def436 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/QuestionUndoRedoService.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/QuestionUndoRedoService.ts @@ -17,6 +17,8 @@ * domain object. */ +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionUndoRedoService', [ 'BaseUndoRedoService', function(BaseUndoRedoService) { var child = Object.create(BaseUndoRedoService); diff --git a/core/templates/dev/head/domain/editor/undo_redo/UndoRedoService.ts b/core/templates/dev/head/domain/editor/undo_redo/UndoRedoService.ts index a4aaf80183ca..8b99dbb9f84f 100644 --- a/core/templates/dev/head/domain/editor/undo_redo/UndoRedoService.ts +++ b/core/templates/dev/head/domain/editor/undo_redo/UndoRedoService.ts @@ -18,6 +18,8 @@ require('domain/editor/undo_redo/BaseUndoRedoService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('UndoRedoService', [ 'BaseUndoRedoService', function(BaseUndoRedoService) { var child = Object.create(BaseUndoRedoService); diff --git a/core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts b/core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts index 28b27986f5ec..4cacf2e6346d 100644 --- a/core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/AnswerGroupObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/exploration/OutcomeObjectFactory.ts'); require('domain/exploration/RuleObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AnswerGroupObjectFactory', [ 'OutcomeObjectFactory', 'RuleObjectFactory', function(OutcomeObjectFactory, RuleObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts b/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts index 6376d0f43d44..1ade18df13af 100644 --- a/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/AnswerStatsObjectFactory.ts @@ -17,6 +17,8 @@ * particular answer from some particular state. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AnswerStatsObjectFactory', [function() { /** * @constructor diff --git a/core/templates/dev/head/domain/exploration/AudioTranslationObjectFactory.ts b/core/templates/dev/head/domain/exploration/AudioTranslationObjectFactory.ts index 0a50506c6365..a019e0d06d3b 100644 --- a/core/templates/dev/head/domain/exploration/AudioTranslationObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/AudioTranslationObjectFactory.ts @@ -17,6 +17,8 @@ * AudioTranslation domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AudioTranslationObjectFactory', [function() { var AudioTranslation = function(filename, fileSizeBytes, needsUpdate) { this.filename = filename; diff --git a/core/templates/dev/head/domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts b/core/templates/dev/head/domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts index e039a0f71802..66bea1f6d0c5 100644 --- a/core/templates/dev/head/domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/exploration/AudioTranslationObjectFactory.ts'); require('domain/utilities/LanguageUtilService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ContentIdsToAudioTranslationsObjectFactory', [ 'AudioTranslationObjectFactory', 'LanguageUtilService', 'COMPONENT_NAME_FEEDBACK', function(AudioTranslationObjectFactory, diff --git a/core/templates/dev/head/domain/exploration/EditableExplorationBackendApiService.ts b/core/templates/dev/head/domain/exploration/EditableExplorationBackendApiService.ts index c91ac23efc50..0cc9cf20d95d 100644 --- a/core/templates/dev/head/domain/exploration/EditableExplorationBackendApiService.ts +++ b/core/templates/dev/head/domain/exploration/EditableExplorationBackendApiService.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditableExplorationBackendApiService', [ '$http', '$q', 'ReadOnlyExplorationBackendApiService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactory.ts b/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactory.ts index 876be526d079..1bc86929d28e 100644 --- a/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ExplorationDraftObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationDraftObjectFactory', [ function() { var ExplorationDraft = function(draftChanges, draftChangeListId) { diff --git a/core/templates/dev/head/domain/exploration/ExplorationObjectFactory.ts b/core/templates/dev/head/domain/exploration/ExplorationObjectFactory.ts index cd126287b3fc..8624fb293b01 100644 --- a/core/templates/dev/head/domain/exploration/ExplorationObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ExplorationObjectFactory.ts @@ -22,6 +22,8 @@ require('domain/exploration/ParamSpecsObjectFactory.ts'); require('domain/exploration/StatesObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationObjectFactory', [ '$log', 'ParamChangesObjectFactory', 'ParamSpecsObjectFactory', 'StatesObjectFactory', 'UrlInterpolationService', diff --git a/core/templates/dev/head/domain/exploration/HintObjectFactory.ts b/core/templates/dev/head/domain/exploration/HintObjectFactory.ts index e0fc4e2a2707..bd21a353ad6c 100644 --- a/core/templates/dev/head/domain/exploration/HintObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/HintObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/exploration/SubtitledHtmlObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('HintObjectFactory', [ 'SubtitledHtmlObjectFactory', function(SubtitledHtmlObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/InteractionObjectFactory.ts b/core/templates/dev/head/domain/exploration/InteractionObjectFactory.ts index b6104f494d5f..52656a2bc046 100644 --- a/core/templates/dev/head/domain/exploration/InteractionObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/InteractionObjectFactory.ts @@ -22,6 +22,8 @@ require('domain/exploration/HintObjectFactory.ts'); require('domain/exploration/OutcomeObjectFactory.ts'); require('domain/exploration/SolutionObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('InteractionObjectFactory', [ 'AnswerGroupObjectFactory', 'HintObjectFactory', 'OutcomeObjectFactory', 'SolutionObjectFactory', diff --git a/core/templates/dev/head/domain/exploration/OutcomeObjectFactory.ts b/core/templates/dev/head/domain/exploration/OutcomeObjectFactory.ts index 17245e1c83c8..7c1a23b75b15 100644 --- a/core/templates/dev/head/domain/exploration/OutcomeObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/OutcomeObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/exploration/SubtitledHtmlObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('OutcomeObjectFactory', [ 'SubtitledHtmlObjectFactory', function(SubtitledHtmlObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts index fad79bba1075..55a1353371ce 100644 --- a/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamChangeObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ParamChangeObjectFactory', [function() { var ParamChange = function(customizationArgs, generatorId, name) { this.customizationArgs = customizationArgs; diff --git a/core/templates/dev/head/domain/exploration/ParamChangesObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamChangesObjectFactory.ts index 18913e6a165c..0e3084f14122 100644 --- a/core/templates/dev/head/domain/exploration/ParamChangesObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamChangesObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/exploration/ParamChangeObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ParamChangesObjectFactory', [ 'ParamChangeObjectFactory', function(ParamChangeObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/ParamMetadataObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamMetadataObjectFactory.ts index 5cc23cbc3ced..a4daa6aa94f5 100644 --- a/core/templates/dev/head/domain/exploration/ParamMetadataObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamMetadataObjectFactory.ts @@ -19,6 +19,8 @@ require('pages/exploration-editor-page/services/parameter-metadata.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ParamMetadataObjectFactory', [ 'PARAM_ACTION_GET', 'PARAM_ACTION_SET', function(PARAM_ACTION_GET, PARAM_ACTION_SET) { diff --git a/core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts index 0015f68dbfaf..28bfb3a33917 100644 --- a/core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamSpecObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/exploration/ParamTypeObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ParamSpecObjectFactory', [ 'ParamTypeObjectFactory', function(ParamTypeObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactory.ts index 312ee8f98a6b..2717308ff5c8 100644 --- a/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamSpecsObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/exploration/ParamSpecObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ParamSpecsObjectFactory', [ 'ParamSpecObjectFactory', function(ParamSpecObjectFactory) { diff --git a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts index 554221f91ea1..6cbf6bc3d487 100644 --- a/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/ParamTypeObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ParamTypeObjectFactory', [function() { /** * @private @constructor diff --git a/core/templates/dev/head/domain/exploration/ReadOnlyExplorationBackendApiService.ts b/core/templates/dev/head/domain/exploration/ReadOnlyExplorationBackendApiService.ts index 8dee44b4b261..a9f0b394dab0 100644 --- a/core/templates/dev/head/domain/exploration/ReadOnlyExplorationBackendApiService.ts +++ b/core/templates/dev/head/domain/exploration/ReadOnlyExplorationBackendApiService.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ReadOnlyExplorationBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'EXPLORATION_DATA_URL_TEMPLATE', 'EXPLORATION_VERSION_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts b/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts index 6e7eccf2bd12..6e8a282151e8 100644 --- a/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/RecordedVoiceoversObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/exploration/VoiceoverObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('RecordedVoiceoversObjectFactory', [ 'VoiceoverObjectFactory', 'COMPONENT_NAME_FEEDBACK', function( diff --git a/core/templates/dev/head/domain/exploration/RuleObjectFactory.ts b/core/templates/dev/head/domain/exploration/RuleObjectFactory.ts index 90858876d75b..4971a8dc6cb9 100644 --- a/core/templates/dev/head/domain/exploration/RuleObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/RuleObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('RuleObjectFactory', [function() { var Rule = function(type, inputs) { this.type = type; diff --git a/core/templates/dev/head/domain/exploration/SolutionObjectFactory.ts b/core/templates/dev/head/domain/exploration/SolutionObjectFactory.ts index e7173e6de2d7..4c3e85cfaaf3 100644 --- a/core/templates/dev/head/domain/exploration/SolutionObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/SolutionObjectFactory.ts @@ -24,6 +24,8 @@ require('filters/string-utility-filters/convert-to-plain-text.filter.ts'); require('services/ExplorationHtmlFormatterService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SolutionObjectFactory', [ '$filter', 'ExplorationHtmlFormatterService', 'FractionObjectFactory', 'HtmlEscaperService', 'NumberWithUnitsObjectFactory', diff --git a/core/templates/dev/head/domain/exploration/StatesObjectFactory.ts b/core/templates/dev/head/domain/exploration/StatesObjectFactory.ts index 2ed5a09f8bc4..56a6bc0df1f4 100644 --- a/core/templates/dev/head/domain/exploration/StatesObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/StatesObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/state/StateObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StatesObjectFactory', [ 'StateObjectFactory', 'INTERACTION_SPECS', function(StateObjectFactory, INTERACTION_SPECS) { diff --git a/core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts b/core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts index 507620030414..54d0b1b237f4 100644 --- a/core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/SubtitledHtmlObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SubtitledHtmlObjectFactory', [function() { var SubtitledHtml = function(html, contentId) { this._html = html; diff --git a/core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts b/core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts index ebc8876ba1bc..956734aa0b17 100644 --- a/core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/VoiceoverObjectFactory.ts @@ -17,6 +17,8 @@ * Voiceover domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('VoiceoverObjectFactory', [function() { var Voiceover = function(filename, fileSizeBytes, needsUpdate) { this.filename = filename; diff --git a/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts b/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts index bb6258fe5342..41a1dc43fcf7 100644 --- a/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/WrittenTranslationObjectFactory.ts @@ -17,6 +17,8 @@ * WrittenTranslation domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('WrittenTranslationObjectFactory', [function() { var WrittenTranslation = function(html, needsUpdate) { this.html = html; diff --git a/core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts b/core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts index edc81d5a8c33..212f03fab568 100644 --- a/core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts +++ b/core/templates/dev/head/domain/exploration/WrittenTranslationsObjectFactory.ts @@ -21,6 +21,8 @@ require('domain/exploration/AudioTranslationObjectFactory.ts'); require('domain/exploration/WrittenTranslationObjectFactory.ts'); require('domain/utilities/LanguageUtilService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('WrittenTranslationsObjectFactory', [ 'WrittenTranslationObjectFactory', function(WrittenTranslationObjectFactory) { var WrittenTranslations = function(translationsMapping) { diff --git a/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts b/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts index eb1268ca1ae9..2d6f0babbfca 100644 --- a/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts +++ b/core/templates/dev/head/domain/feedback_message/FeedbackMessageSummaryObjectFactory.ts @@ -17,6 +17,8 @@ message domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('FeedbackMessageSummaryObjectFactory', [function() { var FeedbackMessageSummary = function( messageId, text, updatedStatus, suggestionHtml, currentContentHtml, diff --git a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts index bed1ba04f029..ae7c347cd815 100644 --- a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts +++ b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadObjectFactory.ts @@ -17,6 +17,8 @@ thread domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('FeedbackThreadObjectFactory', [function() { var FeedbackThread = function( status, subject, summary, originalAuthorName, lastUpdated, messageCount, diff --git a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts index bd2f46935526..462f2a4453a7 100644 --- a/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts +++ b/core/templates/dev/head/domain/feedback_thread/FeedbackThreadSummaryObjectFactory.ts @@ -17,6 +17,8 @@ domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('FeedbackThreadSummaryObjectFactory', [function() { var FeedbackThreadSummary = function( status, originalAuthorId, lastUpdated, lastMessageText, totalMessageCount, diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts index 7465e6003c8a..cdee1d2f78e9 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardActivityIdsObjectFactory.ts @@ -17,6 +17,8 @@ dashboard activity ids domain object. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerDashboardActivityIdsObjectFactory', [function() { var LearnerDashboardActivityIds = function( incompleteExplorationIds, incompleteCollectionIds, diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiService.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiService.ts index f08d97dd5c5b..27f277dcfad7 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiService.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardBackendApiService.ts @@ -17,6 +17,8 @@ * backend. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerDashboardBackendApiService', ['$http', function($http) { var _fetchLearnerDashboardData = function() { return $http.get('/learnerdashboardhandler/data'); diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIconsDirective.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIconsDirective.ts index 9beb3f01d5c1..015b1dba71c9 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIconsDirective.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIconsDirective.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('learnerDashboardIcons', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiService.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiService.ts index 336912f0318f..1d779550b52f 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiService.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerDashboardIdsBackendApiService.ts @@ -17,6 +17,8 @@ * activities present in the learner dashboard. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerDashboardIdsBackendApiService', [ '$http', function($http) { var _fetchLearnerDashboardIds = function() { diff --git a/core/templates/dev/head/domain/learner_dashboard/LearnerPlaylistService.ts b/core/templates/dev/head/domain/learner_dashboard/LearnerPlaylistService.ts index 792a847e2456..b523be4ba298 100644 --- a/core/templates/dev/head/domain/learner_dashboard/LearnerPlaylistService.ts +++ b/core/templates/dev/head/domain/learner_dashboard/LearnerPlaylistService.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerPlaylistService', [ '$http', '$uibModal', 'AlertsService', 'UrlInterpolationService', function($http, $uibModal, AlertsService, UrlInterpolationService) { diff --git a/core/templates/dev/head/domain/objects/FractionObjectFactory.ts b/core/templates/dev/head/domain/objects/FractionObjectFactory.ts index 2fb190aea8ef..8c0294dc825b 100644 --- a/core/templates/dev/head/domain/objects/FractionObjectFactory.ts +++ b/core/templates/dev/head/domain/objects/FractionObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/objects/objects-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('FractionObjectFactory', [ 'FRACTION_PARSING_ERRORS', function(FRACTION_PARSING_ERRORS) { var Fraction = function(isNegative, wholeNumber, numerator, denominator) { diff --git a/core/templates/dev/head/domain/objects/NumberWithUnitsObjectFactory.ts b/core/templates/dev/head/domain/objects/NumberWithUnitsObjectFactory.ts index f0c5cf670c82..a239063c4f7f 100644 --- a/core/templates/dev/head/domain/objects/NumberWithUnitsObjectFactory.ts +++ b/core/templates/dev/head/domain/objects/NumberWithUnitsObjectFactory.ts @@ -35,6 +35,8 @@ require('domain/objects/objects-domain.constants.ts'); base_unit: Define the unit in terms of base unit only if the defined custom unit is a sub unit else assign it 'null' value.*/ +var oppia = require('AppInit.ts').module; + oppia.factory('NumberWithUnitsObjectFactory', [ 'FractionObjectFactory', 'UnitsObjectFactory', 'CURRENCY_UNITS', 'NUMBER_WITH_UNITS_PARSING_ERRORS', function( diff --git a/core/templates/dev/head/domain/objects/UnitsObjectFactory.ts b/core/templates/dev/head/domain/objects/UnitsObjectFactory.ts index ba6a4fc80a34..26ac0aa8832d 100644 --- a/core/templates/dev/head/domain/objects/UnitsObjectFactory.ts +++ b/core/templates/dev/head/domain/objects/UnitsObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Factory for creating instances of Units domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UnitsObjectFactory', ['CURRENCY_UNITS', function(CURRENCY_UNITS) { var Units = function(unitsList) { diff --git a/core/templates/dev/head/domain/objects/objects-domain.constants.ts b/core/templates/dev/head/domain/objects/objects-domain.constants.ts index f66ad311ba95..9745cab50af5 100644 --- a/core/templates/dev/head/domain/objects/objects-domain.constants.ts +++ b/core/templates/dev/head/domain/objects/objects-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for objects domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant('FRACTION_PARSING_ERRORS', { INVALID_CHARS: 'Please only use numerical digits, spaces or forward slashes (/)', diff --git a/core/templates/dev/head/domain/question/EditableQuestionBackendApiService.ts b/core/templates/dev/head/domain/question/EditableQuestionBackendApiService.ts index 3863d695d777..0f2ef1abff8e 100644 --- a/core/templates/dev/head/domain/question/EditableQuestionBackendApiService.ts +++ b/core/templates/dev/head/domain/question/EditableQuestionBackendApiService.ts @@ -29,6 +29,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/question/question-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditableQuestionBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'EDITABLE_QUESTION_DATA_URL_TEMPLATE', 'QUESTION_CREATION_URL', diff --git a/core/templates/dev/head/domain/question/PretestQuestionBackendApiService.ts b/core/templates/dev/head/domain/question/PretestQuestionBackendApiService.ts index d3441cedcb25..8942a1bea986 100644 --- a/core/templates/dev/head/domain/question/PretestQuestionBackendApiService.ts +++ b/core/templates/dev/head/domain/question/PretestQuestionBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/question/question-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PretestQuestionBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'PRETEST_QUESTIONS_URL_TEMPLATE', function( diff --git a/core/templates/dev/head/domain/question/QuestionBackendApiService.ts b/core/templates/dev/head/domain/question/QuestionBackendApiService.ts index 7f2dbc310596..f23c04566b7a 100644 --- a/core/templates/dev/head/domain/question/QuestionBackendApiService.ts +++ b/core/templates/dev/head/domain/question/QuestionBackendApiService.ts @@ -18,6 +18,8 @@ require('domain/question/question-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'QUESTIONS_LIST_URL_TEMPLATE', 'QUESTION_PLAYER_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/question/QuestionObjectFactory.ts b/core/templates/dev/head/domain/question/QuestionObjectFactory.ts index da9d46aff722..44a5cd411b7c 100644 --- a/core/templates/dev/head/domain/question/QuestionObjectFactory.ts +++ b/core/templates/dev/head/domain/question/QuestionObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/state/StateObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionObjectFactory', [ 'StateObjectFactory', 'INTERACTION_SPECS', function(StateObjectFactory, INTERACTION_SPECS) { diff --git a/core/templates/dev/head/domain/question/QuestionUpdateService.ts b/core/templates/dev/head/domain/question/QuestionUpdateService.ts index c1ff7475a6a6..193c10539789 100644 --- a/core/templates/dev/head/domain/question/QuestionUpdateService.ts +++ b/core/templates/dev/head/domain/question/QuestionUpdateService.ts @@ -23,6 +23,8 @@ require('domain/question/QuestionObjectFactory.ts'); require('domain/question/question-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionUpdateService', [ 'ChangeObjectFactory', 'QuestionObjectFactory', 'QuestionUndoRedoService', 'CMD_UPDATE_QUESTION_PROPERTY', 'QUESTION_PROPERTY_LANGUAGE_CODE', diff --git a/core/templates/dev/head/domain/question/question-domain.constants.ts b/core/templates/dev/head/domain/question/question-domain.constants.ts index 32620f37066a..fe8c43c543a5 100644 --- a/core/templates/dev/head/domain/question/question-domain.constants.ts +++ b/core/templates/dev/head/domain/question/question-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for question domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EDITABLE_QUESTION_DATA_URL_TEMPLATE', '/question_editor_handler/data/'); diff --git a/core/templates/dev/head/domain/sidebar/SidebarStatusService.ts b/core/templates/dev/head/domain/sidebar/SidebarStatusService.ts index e836f1fc78da..9854d7dc5ca2 100644 --- a/core/templates/dev/head/domain/sidebar/SidebarStatusService.ts +++ b/core/templates/dev/head/domain/sidebar/SidebarStatusService.ts @@ -19,6 +19,8 @@ require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SidebarStatusService', [ 'WindowDimensionsService', function(WindowDimensionsService) { var pendingSidebarClick = false; diff --git a/core/templates/dev/head/domain/skill/ConceptCardBackendApiService.ts b/core/templates/dev/head/domain/skill/ConceptCardBackendApiService.ts index 7739e1611593..e916e1a1ceca 100644 --- a/core/templates/dev/head/domain/skill/ConceptCardBackendApiService.ts +++ b/core/templates/dev/head/domain/skill/ConceptCardBackendApiService.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/skill/skill-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ConceptCardBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'CONCEPT_CARD_DATA_URL_TEMPLATE', function($http, $q, UrlInterpolationService, CONCEPT_CARD_DATA_URL_TEMPLATE) { diff --git a/core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts b/core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts index a34e7eba4307..bcb1e66d463d 100644 --- a/core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts +++ b/core/templates/dev/head/domain/skill/ConceptCardObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts'); require('domain/exploration/SubtitledHtmlObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ConceptCardObjectFactory', [ 'ContentIdsToAudioTranslationsObjectFactory', 'SubtitledHtmlObjectFactory', 'COMPONENT_NAME_EXPLANATION', diff --git a/core/templates/dev/head/domain/skill/EditableSkillBackendApiService.ts b/core/templates/dev/head/domain/skill/EditableSkillBackendApiService.ts index 6e7dc03f05b7..1c8b5a128464 100644 --- a/core/templates/dev/head/domain/skill/EditableSkillBackendApiService.ts +++ b/core/templates/dev/head/domain/skill/EditableSkillBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/skill/skill-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditableSkillBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'EDITABLE_SKILL_DATA_URL_TEMPLATE', 'SKILL_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/skill/MisconceptionObjectFactory.ts b/core/templates/dev/head/domain/skill/MisconceptionObjectFactory.ts index 14ff9926e523..4b3c95967e66 100644 --- a/core/templates/dev/head/domain/skill/MisconceptionObjectFactory.ts +++ b/core/templates/dev/head/domain/skill/MisconceptionObjectFactory.ts @@ -17,6 +17,8 @@ * misconceptions. */ +var oppia = require('AppInit.ts').module; + oppia.factory('MisconceptionObjectFactory', [ function() { var Misconception = function(id, name, notes, feedback) { diff --git a/core/templates/dev/head/domain/skill/SkillObjectFactory.ts b/core/templates/dev/head/domain/skill/SkillObjectFactory.ts index 327104f74b42..96e49e640894 100644 --- a/core/templates/dev/head/domain/skill/SkillObjectFactory.ts +++ b/core/templates/dev/head/domain/skill/SkillObjectFactory.ts @@ -21,6 +21,8 @@ require('domain/skill/ConceptCardObjectFactory.ts'); require('domain/skill/MisconceptionObjectFactory.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SkillObjectFactory', [ 'ConceptCardObjectFactory', 'MisconceptionObjectFactory', 'ValidatorsService', function( diff --git a/core/templates/dev/head/domain/skill/SkillRightsBackendApiService.ts b/core/templates/dev/head/domain/skill/SkillRightsBackendApiService.ts index acb79bbbb71c..80b97c2e03fb 100644 --- a/core/templates/dev/head/domain/skill/SkillRightsBackendApiService.ts +++ b/core/templates/dev/head/domain/skill/SkillRightsBackendApiService.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SkillRightsBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'SKILL_PUBLISH_URL_TEMPLATE', 'SKILL_RIGHTS_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts b/core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts index 3a1bd18fa234..6de0d9a218f5 100644 --- a/core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts +++ b/core/templates/dev/head/domain/skill/SkillRightsObjectFactory.ts @@ -17,6 +17,8 @@ * skill rights domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SkillRightsObjectFactory', [ function() { var SkillRights = function( diff --git a/core/templates/dev/head/domain/skill/SkillSummaryObjectFactory.ts b/core/templates/dev/head/domain/skill/SkillSummaryObjectFactory.ts index 83590986eda6..01b0d6b9556d 100644 --- a/core/templates/dev/head/domain/skill/SkillSummaryObjectFactory.ts +++ b/core/templates/dev/head/domain/skill/SkillSummaryObjectFactory.ts @@ -17,6 +17,8 @@ * skill summary domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SkillSummaryObjectFactory', [ function() { var SkillSummary = function(skillId, skillDescription) { diff --git a/core/templates/dev/head/domain/skill/SkillUpdateService.ts b/core/templates/dev/head/domain/skill/SkillUpdateService.ts index 708f4f3dc972..29e2dde75bf9 100644 --- a/core/templates/dev/head/domain/skill/SkillUpdateService.ts +++ b/core/templates/dev/head/domain/skill/SkillUpdateService.ts @@ -22,6 +22,8 @@ require('domain/skill/SkillObjectFactory.ts'); require('domain/skill/skill-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SkillUpdateService', [ 'ChangeObjectFactory', 'SkillObjectFactory', 'UndoRedoService', 'CMD_ADD_SKILL_MISCONCEPTION', diff --git a/core/templates/dev/head/domain/skill/skill-domain.constants.ts b/core/templates/dev/head/domain/skill/skill-domain.constants.ts index e49a386921aa..9b3e69bf6a53 100644 --- a/core/templates/dev/head/domain/skill/skill-domain.constants.ts +++ b/core/templates/dev/head/domain/skill/skill-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for skill domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'CONCEPT_CARD_DATA_URL_TEMPLATE', '/concept_card_handler/'); diff --git a/core/templates/dev/head/domain/state/StateObjectFactory.ts b/core/templates/dev/head/domain/state/StateObjectFactory.ts index 873799f7b9b1..965c62b1bd49 100644 --- a/core/templates/dev/head/domain/state/StateObjectFactory.ts +++ b/core/templates/dev/head/domain/state/StateObjectFactory.ts @@ -24,6 +24,8 @@ require('domain/exploration/ParamChangesObjectFactory.ts'); require('domain/exploration/SubtitledHtmlObjectFactory.ts'); require('domain/exploration/WrittenTranslationsObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateObjectFactory', [ 'InteractionObjectFactory', 'ParamChangesObjectFactory', 'RecordedVoiceoversObjectFactory', 'SubtitledHtmlObjectFactory', diff --git a/core/templates/dev/head/domain/state_card/StateCardObjectFactory.ts b/core/templates/dev/head/domain/state_card/StateCardObjectFactory.ts index 384ac0a58f29..39645389ae90 100644 --- a/core/templates/dev/head/domain/state_card/StateCardObjectFactory.ts +++ b/core/templates/dev/head/domain/state_card/StateCardObjectFactory.ts @@ -22,6 +22,8 @@ require( 'audio-translation-language.service.ts'); require('services/ExplorationHtmlFormatterService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateCardObjectFactory', [ 'AudioTranslationLanguageService', 'ExplorationHtmlFormatterService', 'INTERACTION_DISPLAY_MODE_INLINE', 'INTERACTION_SPECS', diff --git a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts index 5052d060e1f9..4db92b8dcfb0 100644 --- a/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/ImprovementActionButtonObjectFactory.ts @@ -17,6 +17,8 @@ * resolve a particular improvement suggestion. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ImprovementActionButtonObjectFactory', [function() { /** * @constructor diff --git a/core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts b/core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts index d60d8f96dfb3..02ab9e09047b 100644 --- a/core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/LearnerActionObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/statistics/statistics-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerActionObjectFactory', [ 'LEARNER_ACTION_SCHEMA_LATEST_VERSION', function(LEARNER_ACTION_SCHEMA_LATEST_VERSION) { diff --git a/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactory.ts b/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactory.ts index 24c219bbd6fa..68522fc0a053 100644 --- a/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/PlaythroughImprovementCardObjectFactory.ts @@ -23,6 +23,8 @@ require('services/PlaythroughIssuesService.ts'); require('domain/statistics/statistics-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughImprovementCardObjectFactory', [ '$uibModal', 'ImprovementActionButtonObjectFactory', 'PlaythroughIssuesService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts b/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts index 2a45ac911809..d9cdacb46d63 100644 --- a/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/PlaythroughIssueObjectFactory.ts @@ -17,6 +17,8 @@ * Issue domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughIssueObjectFactory', [function() { /** * @constructor diff --git a/core/templates/dev/head/domain/statistics/PlaythroughObjectFactory.ts b/core/templates/dev/head/domain/statistics/PlaythroughObjectFactory.ts index 24ba88c1ed3c..5a35951f9948 100644 --- a/core/templates/dev/head/domain/statistics/PlaythroughObjectFactory.ts +++ b/core/templates/dev/head/domain/statistics/PlaythroughObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/statistics/LearnerActionObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughObjectFactory', [ 'LearnerActionObjectFactory', function(LearnerActionObjectFactory) { /** diff --git a/core/templates/dev/head/domain/statistics/statistics-domain.constants.ts b/core/templates/dev/head/domain/statistics/statistics-domain.constants.ts index 2e86452d8533..2969ff2c88d5 100644 --- a/core/templates/dev/head/domain/statistics/statistics-domain.constants.ts +++ b/core/templates/dev/head/domain/statistics/statistics-domain.constants.ts @@ -16,5 +16,7 @@ * @fileoverview Constants for the statistics domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant('LEARNER_ACTION_SCHEMA_LATEST_VERSION', 1); oppia.constant('PLAYTHROUGH_IMPROVEMENT_CARD_TYPE', 'playthrough'); diff --git a/core/templates/dev/head/domain/story/EditableStoryBackendApiService.ts b/core/templates/dev/head/domain/story/EditableStoryBackendApiService.ts index fee11d3b9409..8a53d2145679 100644 --- a/core/templates/dev/head/domain/story/EditableStoryBackendApiService.ts +++ b/core/templates/dev/head/domain/story/EditableStoryBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/story/story-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditableStoryBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'EDITABLE_STORY_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts b/core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts index 9c372e1b716d..df5e2275085e 100644 --- a/core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts +++ b/core/templates/dev/head/domain/story/StoryContentsObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/story/StoryNodeObjectFactory.ts'); require('pages/story-editor-page/story-editor-page.controller.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryContentsObjectFactory', [ 'StoryNodeObjectFactory', 'NODE_ID_PREFIX', function(StoryNodeObjectFactory, NODE_ID_PREFIX) { diff --git a/core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts b/core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts index bc859be5943b..9533fe6723c7 100644 --- a/core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts +++ b/core/templates/dev/head/domain/story/StoryNodeObjectFactory.ts @@ -19,6 +19,8 @@ require('pages/story-editor-page/story-editor-page.controller.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryNodeObjectFactory', ['NODE_ID_PREFIX', function(NODE_ID_PREFIX) { var StoryNode = function( diff --git a/core/templates/dev/head/domain/story/StoryObjectFactory.ts b/core/templates/dev/head/domain/story/StoryObjectFactory.ts index f1c17fa2d407..aab0926e4c79 100644 --- a/core/templates/dev/head/domain/story/StoryObjectFactory.ts +++ b/core/templates/dev/head/domain/story/StoryObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/story/StoryContentsObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryObjectFactory', ['StoryContentsObjectFactory', function(StoryContentsObjectFactory) { var Story = function( diff --git a/core/templates/dev/head/domain/story/StoryUpdateService.ts b/core/templates/dev/head/domain/story/StoryUpdateService.ts index d5e65b7ccfb8..1b13ac4ccf83 100644 --- a/core/templates/dev/head/domain/story/StoryUpdateService.ts +++ b/core/templates/dev/head/domain/story/StoryUpdateService.ts @@ -24,6 +24,8 @@ require('domain/editor/undo_redo/UndoRedoService.ts'); require('domain/story/story-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryUpdateService', [ 'ChangeObjectFactory', 'UndoRedoService', 'CMD_ADD_STORY_NODE', 'CMD_DELETE_STORY_NODE', diff --git a/core/templates/dev/head/domain/story/story-domain.constants.ts b/core/templates/dev/head/domain/story/story-domain.constants.ts index 7175873f6071..a0274ab2c960 100644 --- a/core/templates/dev/head/domain/story/story-domain.constants.ts +++ b/core/templates/dev/head/domain/story/story-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for story domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EDITABLE_STORY_DATA_URL_TEMPLATE', '/story_editor_handler/data//'); diff --git a/core/templates/dev/head/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts b/core/templates/dev/head/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts index 90fb5d41caff..2e561f53cb27 100644 --- a/core/templates/dev/head/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts +++ b/core/templates/dev/head/domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts @@ -17,6 +17,8 @@ * story viewer. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ReadOnlyStoryNodeObjectFactory', [function() { var StoryNode = function( id, title, destinationNodeIds, prerequisiteSkillIds, acquiredSkillIds, diff --git a/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactory.ts b/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactory.ts index 8ea59af2b6b8..c0a91dc206bf 100644 --- a/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactory.ts +++ b/core/templates/dev/head/domain/story_viewer/StoryPlaythroughObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/story_viewer/ReadOnlyStoryNodeObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryPlaythroughObjectFactory', [ 'ReadOnlyStoryNodeObjectFactory', function(ReadOnlyStoryNodeObjectFactory) { // Stores information about a current playthrough of a story for a diff --git a/core/templates/dev/head/domain/story_viewer/StoryViewerBackendApiService.ts b/core/templates/dev/head/domain/story_viewer/StoryViewerBackendApiService.ts index a0929b60016d..995e1102d81d 100644 --- a/core/templates/dev/head/domain/story_viewer/StoryViewerBackendApiService.ts +++ b/core/templates/dev/head/domain/story_viewer/StoryViewerBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/story_viewer/story-viewer-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryViewerBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'STORY_DATA_URL_TEMPLATE', 'STORY_NODE_COMPLETION_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/story_viewer/story-viewer-domain.constants.ts b/core/templates/dev/head/domain/story_viewer/story-viewer-domain.constants.ts index 078ce97ea934..d8a1c5f79891 100644 --- a/core/templates/dev/head/domain/story_viewer/story-viewer-domain.constants.ts +++ b/core/templates/dev/head/domain/story_viewer/story-viewer-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for story viewer domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'STORY_DATA_URL_TEMPLATE', '/story_data_handler/'); diff --git a/core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts b/core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts index 508262ba156d..3ec0666db8b2 100644 --- a/core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts +++ b/core/templates/dev/head/domain/suggestion/SuggestionObjectFactory.ts @@ -17,6 +17,8 @@ domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionObjectFactory', [function() { var Suggestion = function( suggestionType, suggestionId, targetType, targetId, status, authorName, diff --git a/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactory.ts b/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactory.ts index 1d89acde1b1e..a2b0b22495d6 100644 --- a/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactory.ts +++ b/core/templates/dev/head/domain/suggestion/SuggestionThreadObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/suggestion/SuggestionObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionThreadObjectFactory', [ 'SuggestionObjectFactory', function(SuggestionObjectFactory) { var SuggestionThread = function( diff --git a/core/templates/dev/head/domain/summary/ExplorationSummaryBackendApiService.ts b/core/templates/dev/head/domain/summary/ExplorationSummaryBackendApiService.ts index 67670d4ebba6..5820ae825806 100644 --- a/core/templates/dev/head/domain/summary/ExplorationSummaryBackendApiService.ts +++ b/core/templates/dev/head/domain/summary/ExplorationSummaryBackendApiService.ts @@ -20,6 +20,8 @@ require('services/AlertsService.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationSummaryBackendApiService', [ '$http', '$q', 'AlertsService', 'ValidatorsService', 'EXPLORATION_SUMMARY_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/topic/EditableTopicBackendApiService.ts b/core/templates/dev/head/domain/topic/EditableTopicBackendApiService.ts index f61fd026849f..1129b1344e06 100644 --- a/core/templates/dev/head/domain/topic/EditableTopicBackendApiService.ts +++ b/core/templates/dev/head/domain/topic/EditableTopicBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/topic/topic-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditableTopicBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'EDITABLE_TOPIC_DATA_URL_TEMPLATE', 'SUBTOPIC_PAGE_EDITOR_DATA_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/topic/SubtopicObjectFactory.ts b/core/templates/dev/head/domain/topic/SubtopicObjectFactory.ts index d1f579f006f1..4b6c26496773 100644 --- a/core/templates/dev/head/domain/topic/SubtopicObjectFactory.ts +++ b/core/templates/dev/head/domain/topic/SubtopicObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/skill/SkillSummaryObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SubtopicObjectFactory', ['SkillSummaryObjectFactory', function(SkillSummaryObjectFactory) { var Subtopic = function( diff --git a/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts b/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts index 241df52410af..b8a4fda4cb49 100644 --- a/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts +++ b/core/templates/dev/head/domain/topic/SubtopicPageContentsObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/exploration/ContentIdsToAudioTranslationsObjectFactory.ts'); require('domain/exploration/SubtitledHtmlObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SubtopicPageContentsObjectFactory', [ 'ContentIdsToAudioTranslationsObjectFactory', 'SubtitledHtmlObjectFactory', function( diff --git a/core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts b/core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts index 98bd0fb19afa..a116de39e415 100644 --- a/core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts +++ b/core/templates/dev/head/domain/topic/SubtopicPageObjectFactory.ts @@ -19,6 +19,8 @@ require('domain/topic/SubtopicPageContentsObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SubtopicPageObjectFactory', [ 'SubtopicPageContentsObjectFactory', function(SubtopicPageContentsObjectFactory) { diff --git a/core/templates/dev/head/domain/topic/TopicObjectFactory.ts b/core/templates/dev/head/domain/topic/TopicObjectFactory.ts index 4192bd812755..19683dd6a2b4 100644 --- a/core/templates/dev/head/domain/topic/TopicObjectFactory.ts +++ b/core/templates/dev/head/domain/topic/TopicObjectFactory.ts @@ -20,6 +20,8 @@ require('domain/skill/SkillSummaryObjectFactory.ts'); require('domain/topic/SubtopicObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicObjectFactory', [ 'SkillSummaryObjectFactory', 'SubtopicObjectFactory', function(SkillSummaryObjectFactory, SubtopicObjectFactory) { diff --git a/core/templates/dev/head/domain/topic/TopicRightsBackendApiService.ts b/core/templates/dev/head/domain/topic/TopicRightsBackendApiService.ts index 88b550272031..fb6e515830c6 100644 --- a/core/templates/dev/head/domain/topic/TopicRightsBackendApiService.ts +++ b/core/templates/dev/head/domain/topic/TopicRightsBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/topic/topic-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicRightsBackendApiService', [ '$http', '$log', '$q', 'UrlInterpolationService', 'TOPIC_MANAGER_RIGHTS_URL_TEMPLATE', 'TOPIC_RIGHTS_URL_TEMPLATE', diff --git a/core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts b/core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts index dcead88dc83d..2a3468a2ee06 100644 --- a/core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts +++ b/core/templates/dev/head/domain/topic/TopicRightsObjectFactory.ts @@ -17,6 +17,8 @@ * topic rights domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('TopicRightsObjectFactory', [ function() { var TopicRights = function(published, canPublishTopic, canEditTopic) { diff --git a/core/templates/dev/head/domain/topic/TopicUpdateService.ts b/core/templates/dev/head/domain/topic/TopicUpdateService.ts index 2fa2926b85aa..11c1691492bb 100644 --- a/core/templates/dev/head/domain/topic/TopicUpdateService.ts +++ b/core/templates/dev/head/domain/topic/TopicUpdateService.ts @@ -24,6 +24,8 @@ require('domain/editor/undo_redo/UndoRedoService.ts'); require('domain/topic/topic-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicUpdateService', [ 'ChangeObjectFactory', 'UndoRedoService', 'CMD_ADD_SUBTOPIC', 'CMD_ADD_UNCATEGORIZED_SKILL_ID', diff --git a/core/templates/dev/head/domain/topic/topic-domain.constants.ts b/core/templates/dev/head/domain/topic/topic-domain.constants.ts index 25fcb1a33088..5430eb7bdc9f 100644 --- a/core/templates/dev/head/domain/topic/topic-domain.constants.ts +++ b/core/templates/dev/head/domain/topic/topic-domain.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for topic domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'TOPIC_EDITOR_STORY_URL_TEMPLATE', '/topic_editor_story_handler/'); diff --git a/core/templates/dev/head/domain/topic_viewer/TopicViewerBackendApiService.ts b/core/templates/dev/head/domain/topic_viewer/TopicViewerBackendApiService.ts index 769651d48c54..6543642d1a47 100644 --- a/core/templates/dev/head/domain/topic_viewer/TopicViewerBackendApiService.ts +++ b/core/templates/dev/head/domain/topic_viewer/TopicViewerBackendApiService.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('domain/topic_viewer/topic-viewer-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicViewerBackendApiService', [ '$http', '$q', 'UrlInterpolationService', 'TOPIC_DATA_URL_TEMPLATE', function($http, $q, UrlInterpolationService, TOPIC_DATA_URL_TEMPLATE) { diff --git a/core/templates/dev/head/domain/topic_viewer/topic-viewer-domain.constants.ts b/core/templates/dev/head/domain/topic_viewer/topic-viewer-domain.constants.ts index 3bfe4cc9cebf..3754d6b11949 100644 --- a/core/templates/dev/head/domain/topic_viewer/topic-viewer-domain.constants.ts +++ b/core/templates/dev/head/domain/topic_viewer/topic-viewer-domain.constants.ts @@ -16,5 +16,7 @@ * @fileoverview Constants for the topic viewer domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'TOPIC_DATA_URL_TEMPLATE', '/topic_data_handler/'); diff --git a/core/templates/dev/head/domain/topics_and_skills_dashboard/TopicsAndSkillsDashboardBackendApiService.ts b/core/templates/dev/head/domain/topics_and_skills_dashboard/TopicsAndSkillsDashboardBackendApiService.ts index d21112bc2d26..01215968add9 100644 --- a/core/templates/dev/head/domain/topics_and_skills_dashboard/TopicsAndSkillsDashboardBackendApiService.ts +++ b/core/templates/dev/head/domain/topics_and_skills_dashboard/TopicsAndSkillsDashboardBackendApiService.ts @@ -21,6 +21,8 @@ require( 'domain/topics_and_skills_dashboard/' + 'topics-and-skills-dashboard-domain.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicsAndSkillsDashboardBackendApiService', [ '$http', 'MERGE_SKILLS_URL', function($http, MERGE_SKILLS_URL) { var _fetchDashboardData = function() { diff --git a/core/templates/dev/head/domain/topics_and_skills_dashboard/topics-and-skills-dashboard-domain.constants.ts b/core/templates/dev/head/domain/topics_and_skills_dashboard/topics-and-skills-dashboard-domain.constants.ts index 6d5b335c5bea..01dea16b05d4 100644 --- a/core/templates/dev/head/domain/topics_and_skills_dashboard/topics-and-skills-dashboard-domain.constants.ts +++ b/core/templates/dev/head/domain/topics_and_skills_dashboard/topics-and-skills-dashboard-domain.constants.ts @@ -16,4 +16,6 @@ * @fileoverview Constants for topics and skills dashboard domain. */ +var oppia = require('AppInit.ts').module; + oppia.constant('MERGE_SKILLS_URL', '/merge_skills_handler'); diff --git a/core/templates/dev/head/domain/user/UserInfoObjectFactory.ts b/core/templates/dev/head/domain/user/UserInfoObjectFactory.ts index e4777bced41a..4e9571c83b62 100644 --- a/core/templates/dev/head/domain/user/UserInfoObjectFactory.ts +++ b/core/templates/dev/head/domain/user/UserInfoObjectFactory.ts @@ -17,6 +17,8 @@ * domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UserInfoObjectFactory', [function() { var UserInfo = function( isModerator, isAdmin, isSuperAdmin, isTopicManager, canCreateCollections, diff --git a/core/templates/dev/head/domain/utilities/AudioFileObjectFactory.ts b/core/templates/dev/head/domain/utilities/AudioFileObjectFactory.ts index 4877ef61d9f8..7aac9d692024 100644 --- a/core/templates/dev/head/domain/utilities/AudioFileObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/AudioFileObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Object factory for creating audio files. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AudioFileObjectFactory', [ function() { var AudioFile = function(filename, data) { diff --git a/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts b/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts index 617151995851..6afa504dae1a 100644 --- a/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/AudioLanguageObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Object factory for creating audio languages. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AudioLanguageObjectFactory', [ function() { var AudioLanguage = function(id, description, relatedLanguages) { diff --git a/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts b/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts index 3e06122cede5..5821b6c001e5 100644 --- a/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Object factory for creating autogenerated audio languages. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AutogeneratedAudioLanguageObjectFactory', [ function() { var AutogeneratedAudioLanguage = diff --git a/core/templates/dev/head/domain/utilities/BrowserCheckerService.ts b/core/templates/dev/head/domain/utilities/BrowserCheckerService.ts index 1ee6ccaf4edc..d95b2f0e1f89 100644 --- a/core/templates/dev/head/domain/utilities/BrowserCheckerService.ts +++ b/core/templates/dev/head/domain/utilities/BrowserCheckerService.ts @@ -16,6 +16,8 @@ * @fileoverview Utility service for checking web browser type. */ +var oppia = require('AppInit.ts').module; + oppia.factory('BrowserCheckerService', [ 'AUTOGENERATED_AUDIO_LANGUAGES', function(AUTOGENERATED_AUDIO_LANGUAGES) { diff --git a/core/templates/dev/head/domain/utilities/FileDownloadRequestObjectFactory.ts b/core/templates/dev/head/domain/utilities/FileDownloadRequestObjectFactory.ts index 108b59552015..24a8cbbb16ae 100644 --- a/core/templates/dev/head/domain/utilities/FileDownloadRequestObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/FileDownloadRequestObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Object factory for creating audio files. */ +var oppia = require('AppInit.ts').module; + oppia.factory('FileDownloadRequestObjectFactory', [ function() { var FileDownloadRequest = function(filename, canceler) { diff --git a/core/templates/dev/head/domain/utilities/ImageFileObjectFactory.ts b/core/templates/dev/head/domain/utilities/ImageFileObjectFactory.ts index df54293ab336..3eca5a8da10e 100644 --- a/core/templates/dev/head/domain/utilities/ImageFileObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/ImageFileObjectFactory.ts @@ -16,6 +16,8 @@ * @fileoverview Object factory for creating image files. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ImageFileObjectFactory', [function() { var ImageFile = function(filename, data) { this.filename = filename; diff --git a/core/templates/dev/head/domain/utilities/LanguageUtilService.ts b/core/templates/dev/head/domain/utilities/LanguageUtilService.ts index 71a7cfdf081c..7d9972852ebd 100644 --- a/core/templates/dev/head/domain/utilities/LanguageUtilService.ts +++ b/core/templates/dev/head/domain/utilities/LanguageUtilService.ts @@ -20,6 +20,8 @@ require('domain/utilities/AudioLanguageObjectFactory.ts'); require('domain/utilities/AutogeneratedAudioLanguageObjectFactory.ts'); require('domain/utilities/BrowserCheckerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('LanguageUtilService', [ 'AudioLanguageObjectFactory', 'AutogeneratedAudioLanguageObjectFactory', 'BrowserCheckerService', 'ALL_LANGUAGE_CODES', diff --git a/core/templates/dev/head/domain/utilities/StopwatchObjectFactory.ts b/core/templates/dev/head/domain/utilities/StopwatchObjectFactory.ts index 5cbe7a991d8e..b46adf6d673f 100644 --- a/core/templates/dev/head/domain/utilities/StopwatchObjectFactory.ts +++ b/core/templates/dev/head/domain/utilities/StopwatchObjectFactory.ts @@ -18,6 +18,8 @@ // A simple service that provides stopwatch instances. Each stopwatch can be // independently reset and queried for the current time. +var oppia = require('AppInit.ts').module; + oppia.factory('StopwatchObjectFactory', ['$log', function($log) { var Stopwatch = function() { this.startTime = null; diff --git a/core/templates/dev/head/domain/utilities/UrlInterpolationService.ts b/core/templates/dev/head/domain/utilities/UrlInterpolationService.ts index 8ccdde4d6219..90394f99097e 100644 --- a/core/templates/dev/head/domain/utilities/UrlInterpolationService.ts +++ b/core/templates/dev/head/domain/utilities/UrlInterpolationService.ts @@ -16,11 +16,14 @@ require('services/AlertsService.ts'); require('services/contextual/UrlService.ts'); require('services/UtilsService.ts'); +require('app.constants.ts'); /** * @fileoverview Service to construct URLs by inserting variables within them as * necessary to have a fully-qualified URL. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UrlInterpolationService', [ 'AlertsService', 'UrlService', 'UtilsService', 'DEV_MODE', function(AlertsService, UrlService, UtilsService, DEV_MODE) { diff --git a/core/templates/dev/head/expressions/ExpressionEvaluatorService.ts b/core/templates/dev/head/expressions/ExpressionEvaluatorService.ts index 5b0520c938b8..7b90cb328ed5 100644 --- a/core/templates/dev/head/expressions/ExpressionEvaluatorService.ts +++ b/core/templates/dev/head/expressions/ExpressionEvaluatorService.ts @@ -66,6 +66,8 @@ require('expressions/ExpressionParserService.js'); require('expressions/ExpressionSyntaxTreeService.ts'); // Service for expression evaluation. +var oppia = require('AppInit.ts').module; + oppia.factory('ExpressionEvaluatorService', [ '$log', 'ExpressionParserService', 'ExpressionSyntaxTreeService', function($log, ExpressionParserService, ExpressionSyntaxTreeService) { diff --git a/core/templates/dev/head/expressions/ExpressionInterpolationService.ts b/core/templates/dev/head/expressions/ExpressionInterpolationService.ts index 5404ab88563e..7f0d2caf161f 100644 --- a/core/templates/dev/head/expressions/ExpressionInterpolationService.ts +++ b/core/templates/dev/head/expressions/ExpressionInterpolationService.ts @@ -35,6 +35,8 @@ require('services/HtmlEscaperService.ts'); // processUnicode('abc{{a}}', [{}]) returns null. // processUnicode('{[a}}', [{'a': ''}]) returns // ''. +var oppia = require('AppInit.ts').module; + oppia.factory('ExpressionInterpolationService', [ '$filter', 'ExpressionEvaluatorService', 'ExpressionParserService', 'ExpressionSyntaxTreeService', 'HtmlEscaperService', diff --git a/core/templates/dev/head/expressions/ExpressionParserService.js b/core/templates/dev/head/expressions/ExpressionParserService.js index bb23397191dd..b38049faab12 100644 --- a/core/templates/dev/head/expressions/ExpressionParserService.js +++ b/core/templates/dev/head/expressions/ExpressionParserService.js @@ -1,3 +1,5 @@ +var oppia = require('AppInit.ts').module; + oppia.factory('ExpressionParserService', ['$log', function($log) { /* * Generated by PEG.js 0.8.0. diff --git a/core/templates/dev/head/expressions/ExpressionSyntaxTreeService.ts b/core/templates/dev/head/expressions/ExpressionSyntaxTreeService.ts index 3dd22a070224..703dbdbf985a 100644 --- a/core/templates/dev/head/expressions/ExpressionSyntaxTreeService.ts +++ b/core/templates/dev/head/expressions/ExpressionSyntaxTreeService.ts @@ -18,6 +18,8 @@ require('expressions/ExpressionParserService.js'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExpressionSyntaxTreeService', [ '$log', 'ExpressionParserService', 'PARAMETER_TYPES', function($log, ExpressionParserService, PARAMETER_TYPES) { diff --git a/core/templates/dev/head/expressions/ExpressionTypeParserService.ts b/core/templates/dev/head/expressions/ExpressionTypeParserService.ts index 13bfd5a35dcd..c9021d650a7b 100644 --- a/core/templates/dev/head/expressions/ExpressionTypeParserService.ts +++ b/core/templates/dev/head/expressions/ExpressionTypeParserService.ts @@ -19,6 +19,8 @@ require('expressions/ExpressionParserService.js'); require('expressions/ExpressionSyntaxTreeService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExpressionTypeParserService', [ '$log', 'ExpressionParserService', 'ExpressionSyntaxTreeService', 'PARAMETER_TYPES', diff --git a/core/templates/dev/head/filters/convert-html-to-unicode.filter.ts b/core/templates/dev/head/filters/convert-html-to-unicode.filter.ts index 0741d0826d01..6547ac9ca96a 100644 --- a/core/templates/dev/head/filters/convert-html-to-unicode.filter.ts +++ b/core/templates/dev/head/filters/convert-html-to-unicode.filter.ts @@ -16,6 +16,8 @@ * @fileoverview Converts HTML to unicode. */ +var oppia = require('AppInit.ts').module; + oppia.filter('convertHtmlToUnicode', [function() { return function(html) { return angular.element('
' + html + '
').text(); diff --git a/core/templates/dev/head/filters/convert-unicode-to-html.filter.ts b/core/templates/dev/head/filters/convert-unicode-to-html.filter.ts index 108c0425dd47..0bf8332de49c 100644 --- a/core/templates/dev/head/filters/convert-unicode-to-html.filter.ts +++ b/core/templates/dev/head/filters/convert-unicode-to-html.filter.ts @@ -18,6 +18,8 @@ require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.filter('convertUnicodeToHtml', [ '$sanitize', 'HtmlEscaperService', function($sanitize, HtmlEscaperService) { diff --git a/core/templates/dev/head/filters/convert-unicode-with-params-to-html.filter.ts b/core/templates/dev/head/filters/convert-unicode-with-params-to-html.filter.ts index 814b3f4bfa8c..2d730e42f244 100644 --- a/core/templates/dev/head/filters/convert-unicode-with-params-to-html.filter.ts +++ b/core/templates/dev/head/filters/convert-unicode-with-params-to-html.filter.ts @@ -23,6 +23,8 @@ require('filters/convert-unicode-to-html.filter.ts'); +var oppia = require('AppInit.ts').module; + oppia.filter('convertUnicodeWithParamsToHtml', ['$filter', function($filter) { var assert = function(text) { if (!text) { diff --git a/core/templates/dev/head/filters/format-rte-preview.filter.ts b/core/templates/dev/head/filters/format-rte-preview.filter.ts index 1088a2b047bd..ccb49ef64f3b 100644 --- a/core/templates/dev/head/filters/format-rte-preview.filter.ts +++ b/core/templates/dev/head/filters/format-rte-preview.filter.ts @@ -22,6 +22,8 @@ eg:

Sample1 Sample2

will give as output: Sample1 [Math] Sample2 */ +var oppia = require('AppInit.ts').module; + oppia.filter('formatRtePreview', ['$filter', function($filter) { return function(html) { html = html.replace(/ /ig, ' '); diff --git a/core/templates/dev/head/filters/format-timer.filter.ts b/core/templates/dev/head/filters/format-timer.filter.ts index c2b9068fc297..147ccdb8ecc5 100644 --- a/core/templates/dev/head/filters/format-timer.filter.ts +++ b/core/templates/dev/head/filters/format-timer.filter.ts @@ -16,6 +16,8 @@ * @fileoverview FormatTimer filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('formatTimer', [function() { return function(input) { var formatNum = function(n) { diff --git a/core/templates/dev/head/filters/parameterize-rule-description.filter.ts b/core/templates/dev/head/filters/parameterize-rule-description.filter.ts index 2b3c9c473ce5..dad514050a18 100644 --- a/core/templates/dev/head/filters/parameterize-rule-description.filter.ts +++ b/core/templates/dev/head/filters/parameterize-rule-description.filter.ts @@ -23,6 +23,8 @@ require('filters/format-rte-preview.filter.ts'); // Filter that changes {{...}} tags into the corresponding parameter input // values. Note that this returns an HTML string to accommodate the case of // multiple-choice input and image-click input. +var oppia = require('AppInit.ts').module; + oppia.filter('parameterizeRuleDescription', [ '$filter', 'INTERACTION_SPECS', 'FractionObjectFactory', 'NumberWithUnitsObjectFactory', function( $filter, INTERACTION_SPECS, diff --git a/core/templates/dev/head/filters/remove-duplicates-in-array.filter.ts b/core/templates/dev/head/filters/remove-duplicates-in-array.filter.ts index be4dd4d2e8e7..c705ba94abc9 100644 --- a/core/templates/dev/head/filters/remove-duplicates-in-array.filter.ts +++ b/core/templates/dev/head/filters/remove-duplicates-in-array.filter.ts @@ -16,6 +16,8 @@ * @fileoverview RemoveDuplicatesInArray filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('removeDuplicatesInArray', [function() { return function(input) { if (!input.filter) { diff --git a/core/templates/dev/head/filters/string-utility-filters/camel-case-to-hyphens.filter.ts b/core/templates/dev/head/filters/string-utility-filters/camel-case-to-hyphens.filter.ts index 888de8e0f768..8abc6855860a 100644 --- a/core/templates/dev/head/filters/string-utility-filters/camel-case-to-hyphens.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/camel-case-to-hyphens.filter.ts @@ -16,6 +16,8 @@ * @fileoverview CamelCaseToHyphens filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('camelCaseToHyphens', [function() { return function(input) { var result = input.replace(/([a-z])?([A-Z])/g, '$1-$2').toLowerCase(); diff --git a/core/templates/dev/head/filters/string-utility-filters/capitalize.filter.ts b/core/templates/dev/head/filters/string-utility-filters/capitalize.filter.ts index 3cfcf5527b4c..916165f1717e 100644 --- a/core/templates/dev/head/filters/string-utility-filters/capitalize.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/capitalize.filter.ts @@ -16,6 +16,8 @@ * @fileoverview Capitalize filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('capitalize', [function() { return function(input) { if (!input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/convert-to-plain-text.filter.ts b/core/templates/dev/head/filters/string-utility-filters/convert-to-plain-text.filter.ts index 4dc004353a14..769d2360ad81 100644 --- a/core/templates/dev/head/filters/string-utility-filters/convert-to-plain-text.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/convert-to-plain-text.filter.ts @@ -16,6 +16,8 @@ * @fileoverview ConvertToPlainText filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('convertToPlainText', [function() { return function(input) { var strippedText = input.replace(/(<([^>]+)>)/ig, ''); diff --git a/core/templates/dev/head/filters/string-utility-filters/get-abbreviated-text.filter.ts b/core/templates/dev/head/filters/string-utility-filters/get-abbreviated-text.filter.ts index 83ce19f9a36c..d5a34752dfe2 100644 --- a/core/templates/dev/head/filters/string-utility-filters/get-abbreviated-text.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/get-abbreviated-text.filter.ts @@ -16,6 +16,8 @@ * @fileoverview GetAbbreviatedText filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('getAbbreviatedText', [function() { return function(text, characterCount) { if (text.length > characterCount) { diff --git a/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace-punctuation-and-case.filter.ts b/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace-punctuation-and-case.filter.ts index c7afec9832c7..4f5482669a55 100644 --- a/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace-punctuation-and-case.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace-punctuation-and-case.filter.ts @@ -20,6 +20,8 @@ // line, and removes blank lines. Note that any spaces whose removal does not // result in two alphanumeric "words" being joined together are also removed, // so "hello ? " becomes "hello?". +var oppia = require('AppInit.ts').module; + oppia.filter('normalizeWhitespacePunctuationAndCase', [function() { return function(input) { if (typeof input === 'string' || input instanceof String) { diff --git a/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace.filter.ts b/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace.filter.ts index c49f0ad3735c..4c7c52f0f523 100644 --- a/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/normalize-whitespace.filter.ts @@ -20,6 +20,8 @@ require('services/UtilsService.ts'); // Filter that removes whitespace from the beginning and end of a string, and // replaces interior whitespace with a single space character. +var oppia = require('AppInit.ts').module; + oppia.filter('normalizeWhitespace', ['UtilsService', function(UtilsService) { return function(input) { if (UtilsService.isString(input)) { diff --git a/core/templates/dev/head/filters/string-utility-filters/replace-inputs-with-ellipses.filter.ts b/core/templates/dev/head/filters/string-utility-filters/replace-inputs-with-ellipses.filter.ts index 6b7c1dbca797..4c569402511d 100644 --- a/core/templates/dev/head/filters/string-utility-filters/replace-inputs-with-ellipses.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/replace-inputs-with-ellipses.filter.ts @@ -17,6 +17,8 @@ */ // Filter that replaces all {{...}} in a string with '...'. +var oppia = require('AppInit.ts').module; + oppia.filter('replaceInputsWithEllipses', [function() { var pattern = /\{\{\s*(\w+)\s*(\|\s*\w+\s*)?\}\}/g; return function(input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/truncate-and-capitalize.filter.ts b/core/templates/dev/head/filters/string-utility-filters/truncate-and-capitalize.filter.ts index 90b70f9dcc67..2e2de68bc209 100644 --- a/core/templates/dev/head/filters/string-utility-filters/truncate-and-capitalize.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/truncate-and-capitalize.filter.ts @@ -17,6 +17,8 @@ */ // Note that this filter does not truncate at the middle of a word. +var oppia = require('AppInit.ts').module; + oppia.filter('truncateAndCapitalize', [function() { return function(input, maxNumberOfCharacters) { if (!input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-ellipsis.filter.ts b/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-ellipsis.filter.ts index 58b0ecba2df4..15310b2c87b7 100644 --- a/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-ellipsis.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-ellipsis.filter.ts @@ -17,6 +17,8 @@ */ // Filter that truncates a string at the first '...'. +var oppia = require('AppInit.ts').module; + oppia.filter('truncateAtFirstEllipsis', [function() { var pattern = /\.\.\./g; return function(input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-line.filter.ts b/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-line.filter.ts index fc49350d3429..222d2eb5a390 100644 --- a/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-line.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/truncate-at-first-line.filter.ts @@ -16,6 +16,8 @@ * @fileoverview TruncateAtFirstLine filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('truncateAtFirstLine', [function() { return function(input) { if (!input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/truncate.filter.ts b/core/templates/dev/head/filters/string-utility-filters/truncate.filter.ts index f5297802ed65..88acb543893c 100644 --- a/core/templates/dev/head/filters/string-utility-filters/truncate.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/truncate.filter.ts @@ -19,6 +19,8 @@ require('filters/string-utility-filters/convert-to-plain-text.filter.ts'); // Filter that truncates long descriptors. +var oppia = require('AppInit.ts').module; + oppia.filter('truncate', ['$filter', function($filter) { return function(input, length, suffix) { if (!input) { diff --git a/core/templates/dev/head/filters/string-utility-filters/underscores-to-camel-case.filter.ts b/core/templates/dev/head/filters/string-utility-filters/underscores-to-camel-case.filter.ts index a4b260385a6c..e57313a25457 100644 --- a/core/templates/dev/head/filters/string-utility-filters/underscores-to-camel-case.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/underscores-to-camel-case.filter.ts @@ -16,6 +16,8 @@ * @fileoverview UnderscoresToCamelCase filter for Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.filter('underscoresToCamelCase', [function() { return function(input) { return input.replace(/_+(.)/g, function(match, group1) { diff --git a/core/templates/dev/head/filters/string-utility-filters/wrap-text-with-ellipsis.filter.ts b/core/templates/dev/head/filters/string-utility-filters/wrap-text-with-ellipsis.filter.ts index 0684d08cb4b2..b2e130c7ba33 100644 --- a/core/templates/dev/head/filters/string-utility-filters/wrap-text-with-ellipsis.filter.ts +++ b/core/templates/dev/head/filters/string-utility-filters/wrap-text-with-ellipsis.filter.ts @@ -19,6 +19,8 @@ require('filters/string-utility-filters/normalize-whitespace.filter.ts'); require('services/UtilsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.filter('wrapTextWithEllipsis', [ '$filter', 'UtilsService', function($filter, UtilsService) { return function(input, characterCount) { diff --git a/core/templates/dev/head/filters/summarize-nonnegative-number.filter.ts b/core/templates/dev/head/filters/summarize-nonnegative-number.filter.ts index 5b2f37bd9fcb..ae731d97629b 100644 --- a/core/templates/dev/head/filters/summarize-nonnegative-number.filter.ts +++ b/core/templates/dev/head/filters/summarize-nonnegative-number.filter.ts @@ -20,6 +20,8 @@ // the appropriate metric prefix (K, M or B). For example, 167656 // becomes 167.7K. // Users of this filter should ensure that the input is a non-negative number. +var oppia = require('AppInit.ts').module; + oppia.filter('summarizeNonnegativeNumber', [function() { return function(input) { input = Number(input); diff --git a/core/templates/dev/head/filters/truncate-input-based-on-interaction-answer-type.filter.ts b/core/templates/dev/head/filters/truncate-input-based-on-interaction-answer-type.filter.ts index 73149c39118c..c7186c85bb71 100644 --- a/core/templates/dev/head/filters/truncate-input-based-on-interaction-answer-type.filter.ts +++ b/core/templates/dev/head/filters/truncate-input-based-on-interaction-answer-type.filter.ts @@ -24,6 +24,8 @@ require('filters/string-utility-filters/truncate.filter.ts'); truncated. * @param {integer} length - Truncated length of answer. */ +var oppia = require('AppInit.ts').module; + oppia.filter('truncateInputBasedOnInteractionAnswerType', [ '$filter', 'INTERACTION_SPECS', function($filter, INTERACTION_SPECS) { return function(input, interactionId, length) { diff --git a/core/templates/dev/head/pages/Base.ts b/core/templates/dev/head/pages/Base.ts index 34ee87cbd853..3848d6fb7b61 100644 --- a/core/templates/dev/head/pages/Base.ts +++ b/core/templates/dev/head/pages/Base.ts @@ -24,6 +24,8 @@ require('app.constants.ts'); * @fileoverview Oppia's base controller. */ +var oppia = require('AppInit.ts').module; + oppia.controller('Base', [ '$document', '$rootScope', '$scope', 'AlertsService', 'BackgroundMaskService', 'SidebarStatusService', 'UrlInterpolationService', 'UrlService', 'DEV_MODE', diff --git a/core/templates/dev/head/pages/OppiaFooterDirective.ts b/core/templates/dev/head/pages/OppiaFooterDirective.ts index d4682dc171f8..14235b782b85 100644 --- a/core/templates/dev/head/pages/OppiaFooterDirective.ts +++ b/core/templates/dev/head/pages/OppiaFooterDirective.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaFooter', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/about-page/about-page.controller.ts b/core/templates/dev/head/pages/about-page/about-page.controller.ts index 7bdf83a73c71..aefbe76c1800 100644 --- a/core/templates/dev/head/pages/about-page/about-page.controller.ts +++ b/core/templates/dev/head/pages/about-page/about-page.controller.ts @@ -22,6 +22,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('aboutPage', ['UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/about-page/about-page.scripts.ts b/core/templates/dev/head/pages/about-page/about-page.scripts.ts index 32626bf76252..8e54dfdd50f2 100644 --- a/core/templates/dev/head/pages/about-page/about-page.scripts.ts +++ b/core/templates/dev/head/pages/about-page/about-page.scripts.ts @@ -16,6 +16,7 @@ * @fileoverview Directive scripts for the about page. */ -require('base_components/BaseContentDirective.ts'); +require('App.ts'); +require('base_components/BaseContentDirective.ts'); require('pages/about-page/about-page.controller.ts'); diff --git a/core/templates/dev/head/pages/admin-page/activities-tab/admin-dev-mode-activities-tab.directive.ts b/core/templates/dev/head/pages/admin-page/activities-tab/admin-dev-mode-activities-tab.directive.ts index 5c7ccba99e40..c050fcc07191 100644 --- a/core/templates/dev/head/pages/admin-page/activities-tab/admin-dev-mode-activities-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/activities-tab/admin-dev-mode-activities-tab.directive.ts @@ -23,6 +23,8 @@ require('pages/admin-page/services/admin-task-manager.service.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminDevModeActivitiesTab', [ '$http', '$window', 'AdminTaskManagerService', 'UrlInterpolationService', 'ADMIN_HANDLER_URL', diff --git a/core/templates/dev/head/pages/admin-page/activities-tab/admin-prod-mode-activities-tab.directive.ts b/core/templates/dev/head/pages/admin-page/activities-tab/admin-prod-mode-activities-tab.directive.ts index e4c6e4366a77..da38158233b6 100644 --- a/core/templates/dev/head/pages/admin-page/activities-tab/admin-prod-mode-activities-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/activities-tab/admin-prod-mode-activities-tab.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminProdModeActivitiesTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/admin-page/admin-page.constants.ts b/core/templates/dev/head/pages/admin-page/admin-page.constants.ts index 134a6e141137..58f941986473 100644 --- a/core/templates/dev/head/pages/admin-page/admin-page.constants.ts +++ b/core/templates/dev/head/pages/admin-page/admin-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the Oppia admin page. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'ADMIN_ROLE_HANDLER_URL', '/adminrolehandler'); diff --git a/core/templates/dev/head/pages/admin-page/admin-page.directive.ts b/core/templates/dev/head/pages/admin-page/admin-page.directive.ts index e8b72d33959d..2bc1afff266f 100644 --- a/core/templates/dev/head/pages/admin-page/admin-page.directive.ts +++ b/core/templates/dev/head/pages/admin-page/admin-page.directive.ts @@ -79,6 +79,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/admin-page/services/admin-router.service.ts'); require('services/UtilsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminPage', ['UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/admin-page/admin-page.scripts.ts b/core/templates/dev/head/pages/admin-page/admin-page.scripts.ts index 7f0b8ccd9eec..5492fa5e19f9 100644 --- a/core/templates/dev/head/pages/admin-page/admin-page.scripts.ts +++ b/core/templates/dev/head/pages/admin-page/admin-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directives required in admin panel. */ +require('App.ts'); + require('pages/admin-page/admin-page.directive.ts'); diff --git a/core/templates/dev/head/pages/admin-page/config-tab/admin-config-tab.directive.ts b/core/templates/dev/head/pages/admin-page/config-tab/admin-config-tab.directive.ts index 89f6e3059581..90e1d8f89a80 100644 --- a/core/templates/dev/head/pages/admin-page/config-tab/admin-config-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/config-tab/admin-config-tab.directive.ts @@ -21,6 +21,8 @@ require('pages/admin-page/services/admin-task-manager.service.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminConfigTab', [ '$http', '$window', 'AdminTaskManagerService', 'UrlInterpolationService', 'ADMIN_HANDLER_URL', function($http, $window, AdminTaskManagerService, diff --git a/core/templates/dev/head/pages/admin-page/jobs-tab/admin-jobs-tab.directive.ts b/core/templates/dev/head/pages/admin-page/jobs-tab/admin-jobs-tab.directive.ts index 0883e93a9841..f2bfe90ede59 100644 --- a/core/templates/dev/head/pages/admin-page/jobs-tab/admin-jobs-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/jobs-tab/admin-jobs-tab.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminJobsTab', [ '$http', '$timeout', 'UrlInterpolationService', 'ADMIN_HANDLER_URL', 'ADMIN_JOB_OUTPUT_URL_TEMPLATE', diff --git a/core/templates/dev/head/pages/admin-page/misc-tab/admin-misc-tab.directive.ts b/core/templates/dev/head/pages/admin-page/misc-tab/admin-misc-tab.directive.ts index 29a34dd18011..dbd6d7742db3 100644 --- a/core/templates/dev/head/pages/admin-page/misc-tab/admin-misc-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/misc-tab/admin-misc-tab.directive.ts @@ -21,6 +21,8 @@ require('pages/admin-page/services/admin-task-manager.service.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminMiscTab', [ '$http', '$window', 'AdminTaskManagerService', 'UrlInterpolationService', 'ADMIN_HANDLER_URL', 'ADMIN_TOPICS_CSV_DOWNLOAD_HANDLER_URL', diff --git a/core/templates/dev/head/pages/admin-page/navbar/admin-navbar.directive.ts b/core/templates/dev/head/pages/admin-page/navbar/admin-navbar.directive.ts index ad469a8cd1cd..c00f77e63880 100644 --- a/core/templates/dev/head/pages/admin-page/navbar/admin-navbar.directive.ts +++ b/core/templates/dev/head/pages/admin-page/navbar/admin-navbar.directive.ts @@ -22,6 +22,8 @@ require('services/UserService.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminNavbar', [ 'AdminRouterService', 'UrlInterpolationService', 'ADMIN_TAB_URLS', 'LOGOUT_URL', 'PROFILE_URL_TEMPLATE', diff --git a/core/templates/dev/head/pages/admin-page/roles-tab/admin-roles-tab.directive.ts b/core/templates/dev/head/pages/admin-page/roles-tab/admin-roles-tab.directive.ts index a78b5659bd27..81c55eb50fa9 100644 --- a/core/templates/dev/head/pages/admin-page/roles-tab/admin-roles-tab.directive.ts +++ b/core/templates/dev/head/pages/admin-page/roles-tab/admin-roles-tab.directive.ts @@ -23,6 +23,8 @@ require('pages/admin-page/services/admin-task-manager.service.ts'); require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('adminRolesTab', [ '$http', 'AdminTaskManagerService', 'UrlInterpolationService', 'ADMIN_ROLE_HANDLER_URL', diff --git a/core/templates/dev/head/pages/admin-page/roles-tab/role-graph.directive.ts b/core/templates/dev/head/pages/admin-page/roles-tab/role-graph.directive.ts index 339206cbfdca..3a73a0f223b2 100644 --- a/core/templates/dev/head/pages/admin-page/roles-tab/role-graph.directive.ts +++ b/core/templates/dev/head/pages/admin-page/roles-tab/role-graph.directive.ts @@ -20,6 +20,8 @@ require('components/graph-services/graph-layout.service.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('filters/string-utility-filters/truncate.filter.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('roleGraph', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/admin-page/services/admin-router.service.ts b/core/templates/dev/head/pages/admin-page/services/admin-router.service.ts index 5d134395b4d2..c2462041a29c 100644 --- a/core/templates/dev/head/pages/admin-page/services/admin-router.service.ts +++ b/core/templates/dev/head/pages/admin-page/services/admin-router.service.ts @@ -19,6 +19,8 @@ require('pages/admin-page/admin-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AdminRouterService', [ 'ADMIN_TAB_URLS', function(ADMIN_TAB_URLS) { diff --git a/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.ts b/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.ts index c0a2343760a8..301aef1950de 100644 --- a/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.ts +++ b/core/templates/dev/head/pages/admin-page/services/admin-task-manager.service.ts @@ -17,6 +17,8 @@ * page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AdminTaskManagerService', [ function() { var taskIsRunning = false; diff --git a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.constants.ts b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.constants.ts index 9fa2a225804c..603233c729f7 100644 --- a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.constants.ts +++ b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.constants.ts @@ -17,6 +17,8 @@ */ // TODO(bhenning): These constants should be provided by the backend. +var oppia = require('AppInit.ts').module; + oppia.constant( 'EDITABLE_COLLECTION_DATA_URL_TEMPLATE', '/collection_editor_handler/data/'); diff --git a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.directive.ts b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.directive.ts index feb58475da92..1899feae0cf6 100644 --- a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.directive.ts @@ -35,6 +35,8 @@ require('services/PageTitleService.ts'); require('pages/collection-editor-page/collection-editor-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionEditorPage', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.scripts.ts b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.scripts.ts index 8a992ac6ce1c..a6419112b664 100644 --- a/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.scripts.ts +++ b/core/templates/dev/head/pages/collection-editor-page/collection-editor-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directives required in collection editor. */ +require('App.ts'); + require('pages/collection-editor-page/collection-editor-page.directive.ts'); require( 'pages/collection-editor-page/navbar/' + diff --git a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-editor-tab.directive.ts b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-editor-tab.directive.ts index e9ac141e9f15..156a03fc87cd 100644 --- a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-editor-tab.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-editor-tab.directive.ts @@ -29,6 +29,8 @@ require( require( 'pages/collection-editor-page/services/collection-linearizer.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionEditorTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-creator.directive.ts b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-creator.directive.ts index 21c537b37f10..f88e92479dce 100644 --- a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-creator.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-creator.directive.ts @@ -30,6 +30,8 @@ require('services/AlertsService.ts'); require('services/SiteAnalyticsService.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionNodeCreator', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-editor.directive.ts b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-editor.directive.ts index 5dc8f5b639d6..92b2af8bb9bf 100644 --- a/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-editor.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/editor-tab/collection-node-editor.directive.ts @@ -26,6 +26,8 @@ require( 'pages/collection-editor-page/services/collection-linearizer.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionNodeEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/history-tab/collection-history-tab.directive.ts b/core/templates/dev/head/pages/collection-editor-page/history-tab/collection-history-tab.directive.ts index 0524edab8def..7e645d5a4b16 100644 --- a/core/templates/dev/head/pages/collection-editor-page/history-tab/collection-history-tab.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/history-tab/collection-history-tab.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionHistoryTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar-breadcrumb.directive.ts index f9b9d5f11222..4a33b2f5fe4c 100644 --- a/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar-breadcrumb.directive.ts @@ -28,6 +28,8 @@ require('services/stateful/FocusManagerService.ts'); // support both displaying the current title of the collection (or untitled if // it does not yet have one) or setting a new title in the case of an untitled // collection. +var oppia = require('AppInit.ts').module; + oppia.directive('collectionEditorNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar.directive.ts b/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar.directive.ts index 5c886ca2ad84..08e63a6a1425 100644 --- a/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/navbar/collection-editor-navbar.directive.ts @@ -33,6 +33,8 @@ require( require('pages/exploration-editor-page/services/router.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionEditorNavbar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.ts b/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.ts index c01bdd1d1c46..99c90866bc9e 100644 --- a/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.ts +++ b/core/templates/dev/head/pages/collection-editor-page/services/collection-editor-state.service.ts @@ -27,6 +27,8 @@ require('services/AlertsService.ts'); require('pages/collection-editor-page/collection-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionEditorStateService', [ '$rootScope', 'AlertsService', 'CollectionObjectFactory', 'CollectionRightsBackendApiService', 'CollectionRightsObjectFactory', diff --git a/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.ts b/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.ts index d0d24bf42415..edfbbb80aa65 100644 --- a/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.ts +++ b/core/templates/dev/head/pages/collection-editor-page/services/collection-linearizer.service.ts @@ -20,6 +20,8 @@ require('domain/collection/CollectionUpdateService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CollectionLinearizerService', [ 'CollectionUpdateService', function(CollectionUpdateService) { diff --git a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-details-editor.directive.ts b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-details-editor.directive.ts index 7a1d8a487045..e69e51658b68 100644 --- a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-details-editor.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-details-editor.directive.ts @@ -29,6 +29,8 @@ require( 'pages/collection-editor-page/services/collection-editor-state.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionDetailsEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-permissions-card.directive.ts b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-permissions-card.directive.ts index 1f4aee30eb04..0a9ed3507cbd 100644 --- a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-permissions-card.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-permissions-card.directive.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require( 'pages/collection-editor-page/services/collection-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionPermissionsCard', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-settings-tab.directive.ts b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-settings-tab.directive.ts index d980e3720918..858d17c0cadb 100644 --- a/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-settings-tab.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/settings-tab/collection-settings-tab.directive.ts @@ -25,6 +25,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionSettingsTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-editor-page/statistics-tab/collection-statistics-tab.directive.ts b/core/templates/dev/head/pages/collection-editor-page/statistics-tab/collection-statistics-tab.directive.ts index 994ed56db08c..97fabf20b7ea 100644 --- a/core/templates/dev/head/pages/collection-editor-page/statistics-tab/collection-statistics-tab.directive.ts +++ b/core/templates/dev/head/pages/collection-editor-page/statistics-tab/collection-statistics-tab.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionStatisticsTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-player-page/collection-footer/collection-footer.directive.ts b/core/templates/dev/head/pages/collection-player-page/collection-footer/collection-footer.directive.ts index 99c10517bf59..557061253f1e 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-footer/collection-footer.directive.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-footer/collection-footer.directive.ts @@ -23,6 +23,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionFooter', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-player-page/collection-local-nav/collection-local-nav.directive.ts b/core/templates/dev/head/pages/collection-player-page/collection-local-nav/collection-local-nav.directive.ts index 83d357d82921..087c3783157a 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-local-nav/collection-local-nav.directive.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-local-nav/collection-local-nav.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for the local navigation in the collection view. */ +var oppia = require('AppInit.ts').module; + oppia.directive('collectionLocalNav', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-player-page/collection-node-list/collection-node-list.directive.ts b/core/templates/dev/head/pages/collection-player-page/collection-node-list/collection-node-list.directive.ts index 55ca76ce0cf5..c7268b77bccd 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-node-list/collection-node-list.directive.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-node-list/collection-node-list.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('collectionNodeList', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/collection-player-page/collection-player-page.directive.ts b/core/templates/dev/head/pages/collection-player-page/collection-player-page.directive.ts index 7dc35f1ad37c..9a068dd8a8fd 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-player-page.directive.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-player-page.directive.ts @@ -39,6 +39,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); require('services/PageTitleService.ts'); +var oppia = require('AppInit.ts').module; + oppia.animation('.oppia-collection-animate-slide', function() { return { enter: function(element) { diff --git a/core/templates/dev/head/pages/collection-player-page/collection-player-page.scripts.ts b/core/templates/dev/head/pages/collection-player-page/collection-player-page.scripts.ts index d7ab7d44969c..eb4013ea6b86 100644 --- a/core/templates/dev/head/pages/collection-player-page/collection-player-page.scripts.ts +++ b/core/templates/dev/head/pages/collection-player-page/collection-player-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directives required in collection player. */ +require('App.ts'); + require( 'pages/collection-player-page/collection-footer/' + 'collection-footer.directive.ts'); diff --git a/core/templates/dev/head/pages/contact-page/contact-page.scripts.ts b/core/templates/dev/head/pages/contact-page/contact-page.scripts.ts index 3c8e858bb9af..302a97e3f8a0 100644 --- a/core/templates/dev/head/pages/contact-page/contact-page.scripts.ts +++ b/core/templates/dev/head/pages/contact-page/contact-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview File to import necessary scripts for contact page. */ +require('App.ts'); + require('base_components/BaseContentDirective.ts'); require( 'components/common-layout-directives/common-elements/' + diff --git a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.constants.ts b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.constants.ts index 5bb45db4fef9..1eaa91af0064 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.constants.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the creator dashboard. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EXPLORATION_DROPDOWN_STATS', { OPEN_FEEDBACK: 'open_feedback' diff --git a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.ts b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.ts index 5401c228e15b..638de12e85e0 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.controller.ts @@ -85,6 +85,8 @@ require('services/UserService.ts'); require('pages/creator-dashboard-page/creator-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('creatorDashboardPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.scripts.ts b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.scripts.ts index f6c9fa5cff7f..6718f7447b6c 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.scripts.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/creator-dashboard-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directive scripts for the creator dashboard. */ +require('App.ts'); + require('pages/creator-dashboard-page/creator-dashboard-page.controller.ts'); diff --git a/core/templates/dev/head/pages/creator-dashboard-page/suggestion-modal-for-creator-view/suggestion-modal-for-creator-view.service.ts b/core/templates/dev/head/pages/creator-dashboard-page/suggestion-modal-for-creator-view/suggestion-modal-for-creator-view.service.ts index 9e16d991c7db..00ba75317c4f 100644 --- a/core/templates/dev/head/pages/creator-dashboard-page/suggestion-modal-for-creator-view/suggestion-modal-for-creator-view.service.ts +++ b/core/templates/dev/head/pages/creator-dashboard-page/suggestion-modal-for-creator-view/suggestion-modal-for-creator-view.service.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SuggestionModalService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionModalForCreatorDashboardService', [ '$http', '$log', '$rootScope', '$uibModal', 'UrlInterpolationService', diff --git a/core/templates/dev/head/pages/donate-page/donate-page.controller.ts b/core/templates/dev/head/pages/donate-page/donate-page.controller.ts index 4df68bf1fa9a..5cfe5e58b57d 100644 --- a/core/templates/dev/head/pages/donate-page/donate-page.controller.ts +++ b/core/templates/dev/head/pages/donate-page/donate-page.controller.ts @@ -22,6 +22,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SiteAnalyticsService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('donatePage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/donate-page/donate-page.scripts.ts b/core/templates/dev/head/pages/donate-page/donate-page.scripts.ts index 83fe756d77eb..d8bb231a9f33 100644 --- a/core/templates/dev/head/pages/donate-page/donate-page.scripts.ts +++ b/core/templates/dev/head/pages/donate-page/donate-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the donate page. */ +require('App.ts'); + require('pages/OppiaFooterDirective.ts'); require('pages/donate-page/donate-page.controller.ts'); diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-data.service.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-data.service.ts index fa1950fc6978..9665daa67f76 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-data.service.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-data.service.ts @@ -16,6 +16,8 @@ * @fileoverview Services for oppia email dashboard page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('EmailDashboardDataService', [ '$http', '$q', function($http, $q) { var QUERY_DATA_URL = '/emaildashboarddatahandler'; diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.controller.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.controller.ts index b33fddc9026e..5b20e39125e3 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.controller.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.controller.ts @@ -21,6 +21,8 @@ require('base_components/BaseContentDirective.ts'); require('pages/email-dashboard-pages/email-dashboard-data.service.ts'); require('services/UserService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('emailDashboardPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.scripts.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.scripts.ts index 24afdd87d964..eb8d71da237d 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.scripts.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directive scripts for oppia email dashboard page. */ +require('App.ts'); + require('pages/email-dashboard-pages/email-dashboard-page.controller.ts'); diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.controller.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.controller.ts index 74bf6dd8f480..ee24ada2c580 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.controller.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.controller.ts @@ -20,6 +20,8 @@ require('base_components/BaseContentDirective.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('emailDashboardResultPage', [ 'UrlInterpolationService', function( UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.scripts.ts b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.scripts.ts index 31a56d33d028..213b5a4cee3d 100644 --- a/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.scripts.ts +++ b/core/templates/dev/head/pages/email-dashboard-pages/email-dashboard-result.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directive scripts for oppia email dashboard page. */ +require('App.ts'); + require('pages/email-dashboard-pages/email-dashboard-result.controller.ts'); diff --git a/core/templates/dev/head/pages/error-pages/error-page.controller.ts b/core/templates/dev/head/pages/error-pages/error-page.controller.ts index eda6cd0ce442..652cd8744879 100644 --- a/core/templates/dev/head/pages/error-pages/error-page.controller.ts +++ b/core/templates/dev/head/pages/error-pages/error-page.controller.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/PageTitleService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('errorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/error-pages/error-page.scripts.ts b/core/templates/dev/head/pages/error-pages/error-page.scripts.ts index 0679f9c91e59..4ae80df7c63e 100644 --- a/core/templates/dev/head/pages/error-pages/error-page.scripts.ts +++ b/core/templates/dev/head/pages/error-pages/error-page.scripts.ts @@ -16,5 +16,7 @@ * @fileoverview Directive scripts for the error page. */ +require('App.ts'); + require('pages/OppiaFooterDirective.ts'); require('pages/error-pages/error-page.controller.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navbar-breadcrumb.directive.ts index 0dfc420fcdc3..fbe226d122c9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navbar-breadcrumb.directive.ts @@ -22,6 +22,8 @@ require('pages/exploration-editor-page/services/exploration-title.service.ts'); require('pages/exploration-editor-page/services/router.service.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('editorNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navigation.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navigation.directive.ts index 6a40876853b7..d9edc5c42ddb 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navigation.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-navigation/editor-navigation.directive.ts @@ -33,6 +33,8 @@ require('services/SiteAnalyticsService.ts'); require('services/UserService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('editorNavigation', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.ts index 9d04b3d896fb..d457e0cc55e9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/exploration-editor-tab.directive.ts @@ -49,6 +49,8 @@ require('services/AlertsService.ts'); require('services/ContextService.ts'); require('services/ExplorationFeaturesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationEditorTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/exploration-graph.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/exploration-graph.directive.ts index 80f1ddf9ea30..9e0aaba61c7b 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/exploration-graph.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/exploration-graph.directive.ts @@ -26,6 +26,8 @@ require( require('services/AlertsService.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationGraph', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts index 15858ccc025c..93a995e10549 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/graph-directives/state-graph-visualization.directive.ts @@ -26,6 +26,8 @@ require( 'translation-status.service.ts'); /* eslint-disable angular/directive-restrict */ +var oppia = require('AppInit.ts').module; + oppia.directive('stateGraphVisualization', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts index 77cdae7e0dea..3222bfcfbdfa 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/answer-groups-cache.service.ts @@ -19,6 +19,8 @@ * This cache should be reset each time the state editor is initialized. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AnswerGroupsCacheService', [function() { var _cache = {}; return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts index a951c153b20d..142539b69189 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/interaction-details-cache.service.ts @@ -20,6 +20,8 @@ * editor is initialized. */ +var oppia = require('AppInit.ts').module; + oppia.factory('InteractionDetailsCacheService', [function() { var _cache = {}; return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/responses.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/responses.service.ts index b57930c98aac..b6be21ba5b19 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/responses.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/responses.service.ts @@ -38,6 +38,8 @@ require('services/ContextService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ResponsesService', [ '$rootScope', 'AlertsService', 'AnswerGroupsCacheService', 'ContextService', 'OutcomeObjectFactory', diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts index d30c93fe74ba..e08be68fa1fb 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-validity.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service for keeping track of solution validity. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SolutionValidityService', [ function() { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.ts index 3ce2b15b9d84..36c384d2ae33 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/services/solution-verification.service.ts @@ -23,6 +23,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-editor.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SolutionVerificationService', [ '$injector', 'AngularNameService', 'AnswerClassificationService', 'StateEditorService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-name-editor/state-name-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-name-editor/state-name-editor.directive.ts index c0e907f4721b..014ae1dc1543 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-name-editor/state-name-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-name-editor/state-name-editor.directive.ts @@ -27,6 +27,8 @@ require( require('services/EditabilityService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateNameEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-param-changes-editor/state-param-changes-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-param-changes-editor/state-param-changes-editor.directive.ts index 67cc14981d07..934929024d8b 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-param-changes-editor/state-param-changes-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/state-param-changes-editor/state-param-changes-editor.directive.ts @@ -28,6 +28,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateParamChangesEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/test-interaction-panel/test-interaction-panel.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/test-interaction-panel/test-interaction-panel.directive.ts index 0d84c1f417ea..1632c4655bf9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/test-interaction-panel/test-interaction-panel.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/test-interaction-panel/test-interaction-panel.directive.ts @@ -23,6 +23,8 @@ require( require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('testInteractionPanel', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data-editor-panel.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data-editor-panel.service.ts index ff06d732f3bb..d45e2e6f00d9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data-editor-panel.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data-editor-panel.service.ts @@ -47,6 +47,8 @@ require('services/ContextService.ts'); require('services/ExplorationHtmlFormatterService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TrainingDataEditorPanelService', [ '$rootScope', '$uibModal', 'AlertsService', 'UrlInterpolationService', function($rootScope, $uibModal, AlertsService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.ts index 3b5fdd0b7b22..dbc430649455 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-data.service.ts @@ -27,6 +27,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-editor.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TrainingDataService', [ '$http', '$rootScope', 'ExplorationStatesService', 'GraphDataService', 'ResponsesService', 'RuleObjectFactory', 'StateEditorService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-modal.service.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-modal.service.ts index 1fb2fad44933..998329e9c80a 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-modal.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-modal.service.ts @@ -44,6 +44,8 @@ require( require('services/AlertsService.ts'); require('services/ContextService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TrainingModalService', [ '$rootScope', '$uibModal', 'AlertsService', 'UrlInterpolationService', function($rootScope, $uibModal, AlertsService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-panel.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-panel.directive.ts index e612e6a40ef3..7f77964e1a58 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-panel.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/training-panel/training-panel.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for the training panel in the state editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('trainingPanel', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/unresolved-answers-overview/unresolved-answers-overview.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/unresolved-answers-overview/unresolved-answers-overview.directive.ts index 525fb5784b39..b9fdafc35f4e 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/editor-tab/unresolved-answers-overview/unresolved-answers-overview.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/editor-tab/unresolved-answers-overview/unresolved-answers-overview.directive.ts @@ -31,6 +31,8 @@ require('services/StateTopAnswersStatsService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('unresolvedAnswersOverview', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.constants.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.constants.ts index 111a67462266..dad3bd08051b 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.constants.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.constants.ts @@ -17,6 +17,8 @@ * help tab in the navbar. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EXPLORATION_TITLE_INPUT_FOCUS_LABEL', 'explorationTitleInputFocusLabel'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.controller.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.controller.ts index 1a990d376d49..14548c110c16 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.controller.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.controller.ts @@ -259,6 +259,8 @@ require('services/StateTopAnswersStatsService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationEditorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.scripts.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.scripts.ts index 7a45d1d2eeeb..5b0670aa3a94 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.scripts.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-editor-page.scripts.ts @@ -17,6 +17,8 @@ * help tab in the navbar. */ +require('App.ts'); + require( 'pages/exploration-editor-page/editor-navigation/' + 'editor-navbar-breadcrumb.directive.ts'); diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-objective-editor/exploration-objective-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-objective-editor/exploration-objective-editor.directive.ts index 03950f9fdd81..4ddd29a52d8e 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-objective-editor/exploration-objective-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-objective-editor/exploration-objective-editor.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require( 'pages/exploration-editor-page/services/exploration-objective.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationObjectiveEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-save-and-publish-buttons/exploration-save-and-publish-buttons.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-save-and-publish-buttons/exploration-save-and-publish-buttons.directive.ts index e76c963bd2dd..8b0efa7b2721 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-save-and-publish-buttons/exploration-save-and-publish-buttons.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-save-and-publish-buttons/exploration-save-and-publish-buttons.directive.ts @@ -28,6 +28,8 @@ require( 'pages/exploration-editor-page/services/exploration-warnings.service.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationSaveAndPublishButtons', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/exploration-title-editor/exploration-title-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/exploration-title-editor/exploration-title-editor.directive.ts index b57357571546..b043cd962254 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/exploration-title-editor/exploration-title-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/exploration-title-editor/exploration-title-editor.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationTitleEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/feedback-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/feedback-tab.directive.ts index bed365cce911..81648226e600 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/feedback-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/feedback-tab.directive.ts @@ -34,6 +34,8 @@ require('services/UserService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('feedbackTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.ts index b921149ac600..98ba12ce5fd1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-data.service.ts @@ -25,6 +25,8 @@ require('services/AlertsService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ThreadDataService', [ '$http', '$log', '$q', 'AlertsService', 'ExplorationDataService', 'FeedbackThreadObjectFactory', 'SuggestionObjectFactory', diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts index 56e9c2d44593..831a7a50b5de 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/services/thread-status-display.service.ts @@ -17,6 +17,8 @@ * status label for a thread in the feedback tab of the exploration editor. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ThreadStatusDisplayService', [function() { var _STATUS_CHOICES = [{ id: 'open', diff --git a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/thread-table/thread-table.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/thread-table/thread-table.directive.ts index dea9ec745362..718203ce211f 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/thread-table/thread-table.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/feedback-tab/thread-table/thread-table.directive.ts @@ -25,6 +25,8 @@ require( 'thread-status-display.service.ts'); require('services/DateTimeFormatService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('threadTable', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.ts index 26ae60d8dc0d..3c5f03eaa610 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/history-tab.directive.ts @@ -31,6 +31,8 @@ require( require('services/DateTimeFormatService.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('historyTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.ts index 367dc5b38509..cbb1d489ca3c 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/compare-versions.service.ts @@ -24,6 +24,8 @@ require('pages/exploration-editor-page/services/exploration-diff.service.ts'); require( 'pages/exploration-editor-page/history-tab/services/version-tree.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CompareVersionsService', [ '$http', '$q', 'ExplorationDataService', 'ExplorationDiffService', 'ReadOnlyExplorationBackendApiService', 'StateObjectFactory', diff --git a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts index c9f9ca16288c..fc155cc5de5a 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/history-tab/services/version-tree.service.ts @@ -17,6 +17,8 @@ * tree. */ +var oppia = require('AppInit.ts').module; + oppia.factory('VersionTreeService', [function() { var _snapshots = null; var _treeParents = null; diff --git a/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/improvements-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/improvements-tab.directive.ts index d07231f7dff2..629e4e6eef1f 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/improvements-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/improvements-tab.directive.ts @@ -25,6 +25,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); require('services/ImprovementCardService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('improvementsTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/playthrough-improvement-card/playthrough-improvement-card.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/playthrough-improvement-card/playthrough-improvement-card.directive.ts index c4156ee2c062..0dc6c16fae2c 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/playthrough-improvement-card/playthrough-improvement-card.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/improvements-tab/playthrough-improvement-card/playthrough-improvement-card.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/PlaythroughIssuesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('playthroughImprovementCard', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/param-changes-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/param-changes-editor.directive.ts index 729fb82c61ed..4bb5882cb462 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/param-changes-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/param-changes-editor.directive.ts @@ -34,6 +34,8 @@ require( require('services/AlertsService.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('paramChangesEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/value-generator-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/value-generator-editor.directive.ts index 252ec2041a8c..4eb8f6e98681 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/value-generator-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/param-changes-editor/value-generator-editor.directive.ts @@ -19,6 +19,8 @@ // Individual value generator directives can be found in // extensions/value_generators/templates. +var oppia = require('AppInit.ts').module; + oppia.directive('valueGeneratorEditor', ['$compile', function($compile) { return { restrict: 'E', diff --git a/core/templates/dev/head/pages/exploration-editor-page/preview-tab/preview-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/preview-tab/preview-tab.directive.ts index a8b981d22e81..d3df38a982f6 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/preview-tab/preview-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/preview-tab/preview-tab.directive.ts @@ -46,6 +46,8 @@ require( require('services/ContextService.ts'); require('services/ExplorationFeaturesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('previewTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.ts index 2f6eda3869b7..9524c16cd22d 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/angular-name.service.ts @@ -16,6 +16,8 @@ * @fileoverview A service that maps IDs to Angular names. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AngularNameService', [function() { var angularName = null; diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/autosave-info-modals.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/autosave-info-modals.service.ts index 314f0de69d4a..e047408c1251 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/autosave-info-modals.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/autosave-info-modals.service.ts @@ -24,6 +24,8 @@ require( require('pages/exploration-editor-page/services/exploration-data.service.ts'); require('services/LocalStorageService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AutosaveInfoModalsService', [ '$log', '$timeout', '$uibModal', '$window', 'ChangesInHumanReadableFormService', 'ExplorationDataService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/change-list.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/change-list.service.ts index 79fb8964e4ac..a58d2e5b3434 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/change-list.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/change-list.service.ts @@ -22,6 +22,8 @@ require( require('pages/exploration-editor-page/services/exploration-data.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ChangeListService', [ '$log', '$rootScope', 'AlertsService', 'AutosaveInfoModalsService', 'ExplorationDataService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/changes-in-human-readable-form.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/changes-in-human-readable-form.service.ts index 125aa7bcd639..1be8ba30dc4d 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/changes-in-human-readable-form.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/changes-in-human-readable-form.service.ts @@ -18,6 +18,8 @@ require('services/UtilsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ChangesInHumanReadableFormService', [ 'UtilsService', function(UtilsService) { var CMD_ADD_STATE = 'add_state'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/editor-first-time-events.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/editor-first-time-events.service.ts index c6cc380d8d0f..c96ab713ddc0 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/editor-first-time-events.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/editor-first-time-events.service.ts @@ -20,6 +20,8 @@ require('services/SiteAnalyticsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EditorFirstTimeEventsService', [ 'SiteAnalyticsService', function(SiteAnalyticsService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-automatic-text-to-speech.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-automatic-text-to-speech.service.ts index 0422beb0f85a..c1f99d3d865c 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-automatic-text-to-speech.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-automatic-text-to-speech.service.ts @@ -20,6 +20,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationAutomaticTextToSpeechService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-category.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-category.service.ts index ab22688bdd9c..a667dafe5059 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-category.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-category.service.ts @@ -23,6 +23,8 @@ require( require('pages/exploration-editor-page/services/exploration-rights.service.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationCategoryService', [ '$filter', 'ExplorationPropertyService', 'ExplorationRightsService', 'ValidatorsService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-correctness-feedback.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-correctness-feedback.service.ts index 576492b8248b..7570397cf1e1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-correctness-feedback.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-correctness-feedback.service.ts @@ -20,6 +20,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationCorrectnessFeedbackService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-data.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-data.service.ts index 8fbacced2ccd..e9e662ed55a1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-data.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-data.service.ts @@ -23,6 +23,8 @@ require('services/AlertsService.ts'); require('services/LocalStorageService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationDataService', [ '$http', '$log', '$q', '$window', 'AlertsService', 'EditableExplorationBackendApiService', 'LocalStorageService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-diff.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-diff.service.ts index 1664db6d01b8..3b5827361738 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-diff.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-diff.service.ts @@ -18,6 +18,8 @@ require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationDiffService', [ 'INTERACTION_SPECS', function(INTERACTION_SPECS) { var STATE_PROPERTY_ADDED = 'added'; diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-init-state-name.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-init-state-name.service.ts index a02b579306eb..06a2740831f3 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-init-state-name.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-init-state-name.service.ts @@ -22,6 +22,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationInitStateNameService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-language-code.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-language-code.service.ts index f594ccd5bdab..e8bf31f0f8a9 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-language-code.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-language-code.service.ts @@ -20,6 +20,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationLanguageCodeService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-objective.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-objective.service.ts index 10ed13b36c41..23b473d06682 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-objective.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-objective.service.ts @@ -23,6 +23,8 @@ require( require('pages/exploration-editor-page/services/exploration-rights.service.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationObjectiveService', [ '$filter', 'ExplorationPropertyService', 'ExplorationRightsService', 'ValidatorsService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-changes.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-changes.service.ts index bb59a54999e8..381ec2c2fce5 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-changes.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-changes.service.ts @@ -20,6 +20,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationParamChangesService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-specs.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-specs.service.ts index 93bd219f14b3..d45365aad8cf 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-specs.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-param-specs.service.ts @@ -20,6 +20,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationParamSpecsService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { var child = Object.create(ExplorationPropertyService); diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-property.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-property.service.ts index 55373dc77868..5917270f033d 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-property.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-property.service.ts @@ -21,6 +21,8 @@ require('pages/exploration-editor-page/services/change-list.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationPropertyService', [ '$log', '$rootScope', 'AlertsService', 'ChangeListService', function($log, $rootScope, AlertsService, ChangeListService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.ts index 3bada8ed2d8b..b7c958e54df2 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-rights.service.ts @@ -20,6 +20,8 @@ require('pages/exploration-editor-page/services/exploration-data.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationRightsService', [ '$http', 'AlertsService', 'ExplorationDataService', 'ACTIVITY_STATUS_PRIVATE', 'ACTIVITY_STATUS_PUBLIC', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-save.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-save.service.ts index 925dd471776d..1704edfc8660 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-save.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-save.service.ts @@ -51,6 +51,8 @@ require('services/ContextService.ts'); require('services/SiteAnalyticsService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationSaveService', [ '$log', '$q', '$rootScope', '$timeout', '$uibModal', '$window', 'AlertsService', 'AutosaveInfoModalsService', 'ChangeListService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.ts index 8e9d43d627b9..f1091a9a5166 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-states.service.ts @@ -38,6 +38,8 @@ require('services/AlertsService.ts'); require('services/ContextService.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationStatesService', [ '$filter', '$injector', '$location', '$log', '$q', '$rootScope', '$uibModal', 'AlertsService', 'AngularNameService', 'AnswerClassificationService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-tags.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-tags.service.ts index f3874927bfce..ba241c854330 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-tags.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-tags.service.ts @@ -19,6 +19,8 @@ require( 'pages/exploration-editor-page/services/exploration-property.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationTagsService', [ 'ExplorationPropertyService', function(ExplorationPropertyService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-title.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-title.service.ts index 9800dd642c95..e22daf066d96 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-title.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-title.service.ts @@ -23,6 +23,8 @@ require( require('pages/exploration-editor-page/services/exploration-rights.service.ts'); require('services/ValidatorsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationTitleService', [ '$filter', 'ExplorationPropertyService', 'ExplorationRightsService', 'ValidatorsService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-warnings.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-warnings.service.ts index 39ef38d5d050..54ba36348107 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/exploration-warnings.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/exploration-warnings.service.ts @@ -31,6 +31,8 @@ require('services/StateTopAnswersStatsService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationWarningsService', [ '$injector', 'ExplorationParamChangesService', 'ExplorationStatesService', 'ExpressionInterpolationService', 'GraphDataService', 'ImprovementsService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/graph-data.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/graph-data.service.ts index c83952e09950..a6593ab30448 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/graph-data.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/graph-data.service.ts @@ -22,6 +22,8 @@ require( require('pages/exploration-editor-page/services/exploration-states.service.ts'); require('services/ComputeGraphService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('GraphDataService', [ 'ComputeGraphService', 'ExplorationInitStateNameService', 'ExplorationStatesService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/parameter-metadata.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/parameter-metadata.service.ts index 9689689b03de..6cad1cd7f492 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/parameter-metadata.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/parameter-metadata.service.ts @@ -26,6 +26,8 @@ require('pages/exploration-editor-page/services/graph-data.service.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ParameterMetadataService', [ 'ExplorationParamChangesService', 'ExplorationStatesService', 'ExpressionInterpolationService', 'GraphDataService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/router.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/router.service.ts index e02c87a8899e..7abfc15930e0 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/router.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/router.service.ts @@ -25,6 +25,8 @@ require( 'state-editor.service.ts'); require('services/ExplorationFeaturesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('RouterService', [ '$interval', '$location', '$rootScope', '$timeout', '$window', 'ExplorationFeaturesService', 'ExplorationInitStateNameService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/state-tutorial-first-time.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/state-tutorial-first-time.service.ts index 24347143bc8d..d506d5b97f7b 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/state-tutorial-first-time.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/state-tutorial-first-time.service.ts @@ -19,6 +19,8 @@ require( 'pages/exploration-editor-page/services/editor-first-time-events.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateTutorialFirstTimeService', [ '$http', '$rootScope', 'EditorFirstTimeEventsService', function($http, $rootScope, EditorFirstTimeEventsService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/services/user-email-preferences.service.ts b/core/templates/dev/head/pages/exploration-editor-page/services/user-email-preferences.service.ts index 87c8cb67d347..a560a0b77a6f 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/services/user-email-preferences.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/services/user-email-preferences.service.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/exploration-editor-page/services/exploration-data.service.ts'); require('services/AlertsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('UserEmailPreferencesService', [ '$http', '$q', 'AlertsService', 'ExplorationDataService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/settings-tab/settings-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/settings-tab/settings-tab.directive.ts index 60e4a7b1b440..5754128e3a4e 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/settings-tab/settings-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/settings-tab/settings-tab.directive.ts @@ -68,6 +68,8 @@ require('services/ExplorationFeaturesService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('settingsTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/bar-chart.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/bar-chart.directive.ts index dc22b35b092c..7086a69e0cc1 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/bar-chart.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/bar-chart.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for bar chart visualization. */ +var oppia = require('AppInit.ts').module; + oppia.directive('barChart', [function() { return { restrict: 'E', diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/pie-chart.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/pie-chart.directive.ts index a4800db62310..c63ac2fc1bfc 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/pie-chart.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/charts/pie-chart.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for pie chart visualization. */ +var oppia = require('AppInit.ts').module; + oppia.directive('pieChart', [function() { return { restrict: 'E', diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/cyclic-transitions-issue.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/cyclic-transitions-issue.directive.ts index 67dcb73abdb2..f190d1b4c0d8 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/cyclic-transitions-issue.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/cyclic-transitions-issue.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); require('services/PlaythroughIssuesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('cyclicTransitionsIssue', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/early-quit-issue.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/early-quit-issue.directive.ts index 786753ea3408..a123c43c4891 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/early-quit-issue.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/early-quit-issue.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); require('services/PlaythroughIssuesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('earlyQuitIssue', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/multiple-incorrect-issue.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/multiple-incorrect-issue.directive.ts index ffc8f1fff5bb..0fab6a558556 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/multiple-incorrect-issue.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/multiple-incorrect-issue.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/AlertsService.ts'); require('services/PlaythroughIssuesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('multipleIncorrectIssue', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/playthrough-issues.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/playthrough-issues.directive.ts index ba9df8556ac6..615998f3af47 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/playthrough-issues.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/issues/playthrough-issues.directive.ts @@ -29,6 +29,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); require('services/PlaythroughIssuesService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('playthroughIssues', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.ts index 1f5a2a234cf3..ff96eaf1a0d7 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/learner-action-render.service.ts @@ -26,6 +26,8 @@ * learner actions and then returns a giant HTML string. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerActionRenderService', [ '$sce', 'ACTION_TYPE_ANSWER_SUBMIT', 'ACTION_TYPE_EXPLORATION_QUIT', 'ACTION_TYPE_EXPLORATION_START', 'ISSUE_TYPE_MULTIPLE_INCORRECT_SUBMISSIONS', diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.ts index 4d018674a8b1..86e255f3122c 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/services/state-improvement-suggestion.service.ts @@ -18,6 +18,8 @@ require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateImprovementSuggestionService', [ 'IMPROVE_TYPE_INCOMPLETE', function(IMPROVE_TYPE_INCOMPLETE) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/statistics-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/statistics-tab.directive.ts index 43f8ebdcad17..14b570e03bd3 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/statistics-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/statistics-tab/statistics-tab.directive.ts @@ -36,6 +36,8 @@ require('services/StateRulesStatsService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('statisticsTab', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/suggestion-modal-for-editor-view/suggestion-modal-for-exploration-editor.service.ts b/core/templates/dev/head/pages/exploration-editor-page/suggestion-modal-for-editor-view/suggestion-modal-for-exploration-editor.service.ts index 0ced94a89ab4..c3e8ce57e66e 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/suggestion-modal-for-editor-view/suggestion-modal-for-exploration-editor.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/suggestion-modal-for-editor-view/suggestion-modal-for-exploration-editor.service.ts @@ -25,6 +25,8 @@ require( require('services/EditabilityService.ts'); require('services/SuggestionModalService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionModalForExplorationEditorService', [ '$log', '$rootScope', '$uibModal', 'ExplorationDataService', 'ExplorationStatesService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/audio-translation-bar/audio-translation-bar.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/audio-translation-bar/audio-translation-bar.directive.ts index 554063582ff0..1bd01ea726e7 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/audio-translation-bar/audio-translation-bar.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/audio-translation-bar/audio-translation-bar.directive.ts @@ -46,6 +46,8 @@ require('services/UserService.ts'); require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('audioTranslationBar', [ 'UrlInterpolationService', 'UserService', function(UrlInterpolationService, UserService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-language.service.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-language.service.ts index d111920541fd..fc00a8f04752 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-language.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-language.service.ts @@ -19,6 +19,8 @@ require('domain/utilities/LanguageUtilService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TranslationLanguageService', [ '$log', '$rootScope', 'LanguageUtilService', function($log, $rootScope, LanguageUtilService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.ts index c469d5780523..f66772abbc15 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-status.service.ts @@ -36,6 +36,8 @@ require( require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TranslationStatusService', [ 'ExplorationStatesService', 'StateRecordedVoiceoversService', 'StateWrittenTranslationsService', 'TranslationLanguageService', diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-content-id.service.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-content-id.service.ts index bb3d8645d3d5..de10118c3f17 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-content-id.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-content-id.service.ts @@ -23,6 +23,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-recorded-voiceovers.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TranslationTabActiveContentIdService', [ '$log', '$rootScope', 'StateRecordedVoiceoversService', function($log, $rootScope, StateRecordedVoiceoversService) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-mode.service.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-mode.service.ts index a78cebce4742..5281e8f06da8 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-mode.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/translation-tab-active-mode.service.ts @@ -19,6 +19,8 @@ require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TranslationTabActiveModeService', [ '$rootScope', 'TRANSLATION_MODE', 'VOICEOVER_MODE', function($rootScope, TRANSLATION_MODE, VOICEOVER_MODE) { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/voiceover-recording.service.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/voiceover-recording.service.ts index b52d5902988e..06dedfaace5e 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/voiceover-recording.service.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/services/voiceover-recording.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service for handling microphone data and mp3 audio processing. */ +var oppia = require('AppInit.ts').module; + oppia.factory('VoiceoverRecordingService', ['$log', '$q', '$window', function($log, $q, $window) { var audioContextAvailable = null, diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-editor/state-translation-editor.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-editor/state-translation-editor.directive.ts index d3d99e8e96b0..29a9d8210362 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-editor/state-translation-editor.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-editor/state-translation-editor.directive.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for the state translation editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('stateTranslationEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-status-graph/state-translation-status-graph.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-status-graph/state-translation-status-graph.directive.ts index 752374bc8a0e..092d14055b32 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-status-graph/state-translation-status-graph.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation-status-graph/state-translation-status-graph.directive.ts @@ -39,6 +39,8 @@ require( 'components/state-editor/state-editor-properties-services/' + 'state-written-translations.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateTranslationStatusGraph', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation/state-translation.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation/state-translation.directive.ts index 9c78a795b1ac..21a43d0d90dd 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation/state-translation.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/state-translation/state-translation.directive.ts @@ -51,6 +51,8 @@ require( require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stateTranslation', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translation-tab.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translation-tab.directive.ts index 40cde995ecfb..4312842218cc 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translation-tab.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translation-tab.directive.ts @@ -48,6 +48,8 @@ require( require('services/ContextService.ts'); require('services/EditabilityService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('translationTab', ['UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translator-overview/translator-overview.directive.ts b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translator-overview/translator-overview.directive.ts index 579aaf55ffdb..21d5fc13f953 100644 --- a/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translator-overview/translator-overview.directive.ts +++ b/core/templates/dev/head/pages/exploration-editor-page/translation-tab/translator-overview/translator-overview.directive.ts @@ -28,6 +28,8 @@ require( require('pages/exploration-editor-page/exploration-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('translatorOverview', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.constants.ts b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.constants.ts index c696b9ad097f..f73768f70584 100644 --- a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.constants.ts +++ b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants to be used in the learner view. */ +var oppia = require('AppInit.ts').module; + oppia.constant('CONTENT_FOCUS_LABEL_PREFIX', 'content-focus-label-'); oppia.constant('TWO_CARD_THRESHOLD_PX', 960); diff --git a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.controller.ts b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.controller.ts index cff1397fe85b..8c63e1b0688d 100644 --- a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.controller.ts +++ b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.controller.ts @@ -94,6 +94,8 @@ require('domain/exploration/ReadOnlyExplorationBackendApiService.ts'); require('services/ContextService.ts'); require('services/PageTitleService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationPlayerPage', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.scripts.ts b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.scripts.ts index b450b471db95..916a9f76bdc0 100644 --- a/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.scripts.ts +++ b/core/templates/dev/head/pages/exploration-player-page/exploration-player-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts to be used in the learner view. */ +require('App.ts'); + require('pages/exploration-player-page/exploration-player-page.controller.ts'); require( 'pages/exploration-player-page/layout-directives/' + diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/audio-bar.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/audio-bar.directive.ts index 4d26cb61c4b2..a72f56bf6000 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/audio-bar.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/audio-bar.directive.ts @@ -33,6 +33,8 @@ require('services/AudioPlayerService.ts'); require('services/AutogeneratedAudioPlayerService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('audioBar', [ 'AudioPreloaderService', 'UrlInterpolationService', function(AudioPreloaderService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/correctness-footer.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/correctness-footer.directive.ts index 89d8a18dd626..18d30548db7e 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/correctness-footer.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/correctness-footer.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('correctnessFooter', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/exploration-footer.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/exploration-footer.directive.ts index c451b13a64de..2a303872f44a 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/exploration-footer.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/exploration-footer.directive.ts @@ -25,6 +25,8 @@ require('services/ContextService.ts'); require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('explorationFooter', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/feedback-popup.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/feedback-popup.directive.ts index 110435db6e6d..dc6a57b52972 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/feedback-popup.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/feedback-popup.directive.ts @@ -36,6 +36,8 @@ require('services/stateful/FocusManagerService.ts'); // // The state-name argument is optional. If it is not provided, the feedback is // assumed to apply to the exploration as a whole. +var oppia = require('AppInit.ts').module; + oppia.directive('feedbackPopup', [ 'ExplorationEngineService', 'UrlInterpolationService', function(ExplorationEngineService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-local-nav.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-local-nav.directive.ts index aa430052a572..f96ffe985337 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-local-nav.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-local-nav.directive.ts @@ -34,6 +34,8 @@ require('services/stateful/FocusManagerService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('learnerLocalNav', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-view-info.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-view-info.directive.ts index a420223ef094..1bddf49d0d6c 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-view-info.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/learner-view-info.directive.ts @@ -29,6 +29,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/ContextService.ts'); require('services/DateTimeFormatService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('learnerViewInfo', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/layout-directives/progress-nav.directive.ts b/core/templates/dev/head/pages/exploration-player-page/layout-directives/progress-nav.directive.ts index 826bda42583d..0e688c47481f 100644 --- a/core/templates/dev/head/pages/exploration-player-page/layout-directives/progress-nav.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/layout-directives/progress-nav.directive.ts @@ -32,6 +32,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('progressNav', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/learner-experience/continue-button.directive.ts b/core/templates/dev/head/pages/exploration-player-page/learner-experience/continue-button.directive.ts index 4c585255aef1..28b1b40abff0 100644 --- a/core/templates/dev/head/pages/exploration-player-page/learner-experience/continue-button.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/learner-experience/continue-button.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('continueButton', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/learner-experience/conversation-skin.directive.ts b/core/templates/dev/head/pages/exploration-player-page/learner-experience/conversation-skin.directive.ts index c971dfa1f00c..dbcdfff5896c 100644 --- a/core/templates/dev/head/pages/exploration-player-page/learner-experience/conversation-skin.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/learner-experience/conversation-skin.directive.ts @@ -102,6 +102,8 @@ var TIME_HEIGHT_CHANGE_MSEC = 500; var TIME_FADEIN_MSEC = 100; var TIME_NUM_CARDS_CHANGE_MSEC = 500; +var oppia = require('AppInit.ts').module; + oppia.animation('.conversation-skin-animate-tutor-card-on-narrow', function() { var tutorCardLeft, tutorCardWidth, tutorCardHeight, oppiaAvatarLeft; var tutorCardAnimatedLeft, tutorCardAnimatedWidth; diff --git a/core/templates/dev/head/pages/exploration-player-page/learner-experience/input-response-pair.directive.ts b/core/templates/dev/head/pages/exploration-player-page/learner-experience/input-response-pair.directive.ts index 1d79129527ac..cbfd09af6825 100644 --- a/core/templates/dev/head/pages/exploration-player-page/learner-experience/input-response-pair.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/learner-experience/input-response-pair.directive.ts @@ -30,6 +30,8 @@ require('services/ExplorationHtmlFormatterService.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('inputResponsePair', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/learner-experience/supplemental-card.directive.ts b/core/templates/dev/head/pages/exploration-player-page/learner-experience/supplemental-card.directive.ts index 1a4161b61a79..bcd619bc7e09 100644 --- a/core/templates/dev/head/pages/exploration-player-page/learner-experience/supplemental-card.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/learner-experience/supplemental-card.directive.ts @@ -29,6 +29,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('supplementalCard', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/exploration-player-page/learner-experience/tutor-card.directive.ts b/core/templates/dev/head/pages/exploration-player-page/learner-experience/tutor-card.directive.ts index 98b936ebefd8..e9b5ba25e1bb 100644 --- a/core/templates/dev/head/pages/exploration-player-page/learner-experience/tutor-card.directive.ts +++ b/core/templates/dev/head/pages/exploration-player-page/learner-experience/tutor-card.directive.ts @@ -45,6 +45,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.animation('.conversation-skin-responses-animate-slide', function() { return { removeClass: function(element, className, done) { diff --git a/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.ts index c37a2ebcfaf4..ca3fcaaeb912 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/answer-classification.service.ts @@ -27,6 +27,8 @@ require('services/AlertsService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AnswerClassificationService', [ 'AlertsService', 'AnswerClassificationResultObjectFactory', 'PredictionAlgorithmRegistryService', 'StateClassifierMappingService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.ts index b41eff95574f..392a817d9c8d 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-preloader.service.ts @@ -25,6 +25,8 @@ require('services/AssetsBackendApiService.ts'); require('services/ComputeGraphService.ts'); require('services/ContextService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AudioPreloaderService', [ '$uibModal', 'AssetsBackendApiService', 'AudioTranslationLanguageService', 'ComputeGraphService', 'ContextService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.ts index 229a2fa175e6..ad3b0164fd8e 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-language.service.ts @@ -20,6 +20,8 @@ require('domain/utilities/BrowserCheckerService.ts'); require('domain/utilities/LanguageUtilService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AudioTranslationLanguageService', [ 'BrowserCheckerService', 'LanguageUtilService', function( diff --git a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts index 43fd8816d742..c4e60b49937a 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/audio-translation-manager.service.ts @@ -17,6 +17,8 @@ * being played or paused. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AudioTranslationManagerService', [ function() { // Audio translations for the main content of a card at the top. diff --git a/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.ts index 9d79eff58d32..ddaff041181f 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/current-interaction.service.ts @@ -19,6 +19,8 @@ * answer submission process. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CurrentInteractionService', [ function() { var _submitAnswerFn = null; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/exploration-engine.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/exploration-engine.service.ts index cb2271462fa7..e9c138ac0cf8 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/exploration-engine.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/exploration-engine.service.ts @@ -55,6 +55,8 @@ require('pages/interaction-specs.constants.ts'); // The URL determines which of these it is. Some methods may need to be // implemented differently depending on whether the skin is being played // in the learner view, or whether it is being previewed in the editor view. +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationEngineService', [ '$http', '$q', '$rootScope', 'AlertsService', 'AnswerClassificationService', 'AudioPreloaderService', 'AudioTranslationLanguageService', 'ContextService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/exploration-player-state.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/exploration-player-state.service.ts index c4b959e749c7..e78261243fff 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/exploration-player-state.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/exploration-player-state.service.ts @@ -39,6 +39,8 @@ require('services/contextual/UrlService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationPlayerStateService', [ '$log', '$q', '$rootScope', 'ContextService', 'EditableExplorationBackendApiService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/exploration-recommendations.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/exploration-recommendations.service.ts index 875f6181277d..80a32f594b99 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/exploration-recommendations.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/exploration-recommendations.service.ts @@ -20,6 +20,8 @@ require('services/ContextService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationRecommendationsService', [ '$http', 'ContextService', 'UrlService', 'EXPLORATION_EDITOR_TAB_CONTEXT', 'PAGE_CONTEXT', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.ts index c93c0799144c..5842e1101937 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/extract-image-filenames-from-state.service.ts @@ -18,6 +18,8 @@ require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExtractImageFilenamesFromStateService', [ 'HtmlEscaperService', function(HtmlEscaperService) { var INTERACTION_TYPE_MULTIPLE_CHOICE = 'MultipleChoiceInput'; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/fatigue-detection.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/fatigue-detection.service.ts index e8fbfe04311a..43d8d7ff51e0 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/fatigue-detection.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/fatigue-detection.service.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('FatigueDetectionService', [ '$uibModal', 'UrlInterpolationService', function($uibModal, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/exploration-player-page/services/hint-and-solution-modal.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/hint-and-solution-modal.service.ts index 91f76487927d..dad818af65d4 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/hint-and-solution-modal.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/hint-and-solution-modal.service.ts @@ -31,6 +31,8 @@ require('services/AutogeneratedAudioPlayerService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('HintAndSolutionModalService', [ '$uibModal', 'AudioPlayerService', 'AudioTranslationManagerService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/hints-and-solution-manager.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/hints-and-solution-manager.service.ts index 56d44123e98e..8f06557635ac 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/hints-and-solution-manager.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/hints-and-solution-manager.service.ts @@ -18,6 +18,8 @@ require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('HintsAndSolutionManagerService', [ '$rootScope', '$timeout', 'DELAY_FOR_HINT_FEEDBACK_MSEC', 'EVENT_NEW_CARD_AVAILABLE', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.ts index 5bac6c36f5db..c29c9578def4 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/image-preloader.service.ts @@ -24,6 +24,8 @@ require('services/AssetsBackendApiService.ts'); require('services/ComputeGraphService.ts'); require('services/ContextService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ImagePreloaderService', [ '$q', '$uibModal', 'AssetsBackendApiService', 'ComputeGraphService', 'ContextService', 'ExtractImageFilenamesFromStateService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts index 7f3b771ad933..820fc5ee836d 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/learner-params.service.ts @@ -17,6 +17,8 @@ * learner. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerParamsService', [function() { var _paramDict = {}; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/learner-view-rating.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/learner-view-rating.service.ts index 09711bd9f2db..60dbef463f7c 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/learner-view-rating.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/learner-view-rating.service.ts @@ -18,6 +18,8 @@ require('pages/exploration-player-page/services/exploration-engine.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('LearnerViewRatingService', [ '$http', '$rootScope', 'ExplorationEngineService', function($http, $rootScope, ExplorationEngineService) { diff --git a/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.ts index 1daa2ca4fb78..9c0f7ff300b0 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/number-attempts.service.ts @@ -17,6 +17,8 @@ * within a card. */ +var oppia = require('AppInit.ts').module; + oppia.factory('NumberAttemptsService', [ function() { var numberAttempts = 0; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/player-correctness-feedback-enabled.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/player-correctness-feedback-enabled.service.ts index 0d61bc478622..566e12d4c295 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/player-correctness-feedback-enabled.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/player-correctness-feedback-enabled.service.ts @@ -17,6 +17,8 @@ * feedback is enabled or not. */ +var oppia = require('AppInit.ts').module; + oppia.factory('PlayerCorrectnessFeedbackEnabledService', [function() { var _correctnessFeedbackIsEnabled = false; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.ts index 185fb8e9f977..a27c972c0312 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/player-position.service.ts @@ -19,6 +19,8 @@ require('pages/exploration-player-page/services/player-transcript.service.ts'); require('services/ContextService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlayerPositionService', [ 'ContextService', 'PlayerTranscriptService', function( ContextService, PlayerTranscriptService) { diff --git a/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.ts index ea242c8d6880..f3297c28e31d 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/player-transcript.service.ts @@ -22,6 +22,8 @@ require('domain/state_card/StateCardObjectFactory.ts'); // are shown, what answers have been given, etc. Note that this service does // not maintain the currently-active card -- it's more like a log of what the // learner has 'discovered' so far. +var oppia = require('AppInit.ts').module; + oppia.factory('PlayerTranscriptService', [ '$log', 'StateCardObjectFactory', function($log, StateCardObjectFactory) { // Each element of this array represents a 'StateCard' domain object. diff --git a/core/templates/dev/head/pages/exploration-player-page/services/prediction-algorithm-registry.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/prediction-algorithm-registry.service.ts index 25b27e85a474..a8c22f8bdc15 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/prediction-algorithm-registry.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/prediction-algorithm-registry.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service for mapping algorithmId to PredictionAlgorithmService. */ +var oppia = require('AppInit.ts').module; + oppia.factory('PredictionAlgorithmRegistryService', [ '$injector', function($injector) { /** diff --git a/core/templates/dev/head/pages/exploration-player-page/services/question-player-engine.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/question-player-engine.service.ts index 54dd0b43cf15..efe0e30c8085 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/question-player-engine.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/question-player-engine.service.ts @@ -29,6 +29,8 @@ require('services/stateful/FocusManagerService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionPlayerEngineService', [ '$http', '$q', '$rootScope', 'AlertsService', 'AnswerClassificationService', 'ContextService', 'ExplorationHtmlFormatterService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/refresher-exploration-confirmation-modal.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/refresher-exploration-confirmation-modal.service.ts index 27ee80c0e0d7..b68c85973942 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/refresher-exploration-confirmation-modal.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/refresher-exploration-confirmation-modal.service.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/exploration-player-page/services/exploration-engine.service.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('RefresherExplorationConfirmationModalService', [ '$uibModal', 'ExplorationEngineService', 'UrlInterpolationService', 'UrlService', diff --git a/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.ts index 71adbfd79a62..112695c01f50 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/state-classifier-mapping.service.ts @@ -18,6 +18,8 @@ require('domain/classifier/ClassifierObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateClassifierMappingService', [ 'ClassifierObjectFactory', function(ClassifierObjectFactory) { var stateClassifierMapping = null; diff --git a/core/templates/dev/head/pages/exploration-player-page/services/stats-reporting.service.ts b/core/templates/dev/head/pages/exploration-player-page/services/stats-reporting.service.ts index 82be7d1a9d74..148c2d5deced 100644 --- a/core/templates/dev/head/pages/exploration-player-page/services/stats-reporting.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/services/stats-reporting.service.ts @@ -27,6 +27,8 @@ require('services/SiteAnalyticsService.ts'); require('pages/exploration-player-page/exploration-player-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StatsReportingService', [ '$http', '$interval', 'ContextService', 'MessengerService', 'PlaythroughService', 'SiteAnalyticsService', 'StopwatchObjectFactory', diff --git a/core/templates/dev/head/pages/exploration-player-page/suggestion-modal-for-learner-local-view/suggestion-modal-for-exploration-player.service.ts b/core/templates/dev/head/pages/exploration-player-page/suggestion-modal-for-learner-local-view/suggestion-modal-for-exploration-player.service.ts index f78520406677..060d9cdf8ebc 100644 --- a/core/templates/dev/head/pages/exploration-player-page/suggestion-modal-for-learner-local-view/suggestion-modal-for-exploration-player.service.ts +++ b/core/templates/dev/head/pages/exploration-player-page/suggestion-modal-for-learner-local-view/suggestion-modal-for-exploration-player.service.ts @@ -23,6 +23,8 @@ require('pages/exploration-player-page/services/player-transcript.service.ts'); require('services/AlertsService.ts'); require('services/SuggestionModalService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionModalForExplorationPlayerService', [ '$http', '$uibModal', 'AlertsService', 'UrlInterpolationService', function($http, $uibModal, AlertsService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/footer_js_libs.html b/core/templates/dev/head/pages/footer_js_libs.html index a7a7e259ee53..cbb2e5900480 100644 --- a/core/templates/dev/head/pages/footer_js_libs.html +++ b/core/templates/dev/head/pages/footer_js_libs.html @@ -1,4 +1,3 @@ - <% if (webpackConfig.mode == 'production') { %> <% } else { %> diff --git a/core/templates/dev/head/pages/get-started-page/get-started-page.scripts.ts b/core/templates/dev/head/pages/get-started-page/get-started-page.scripts.ts index e0498e63b35b..bbbbf4fcb946 100644 --- a/core/templates/dev/head/pages/get-started-page/get-started-page.scripts.ts +++ b/core/templates/dev/head/pages/get-started-page/get-started-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview File to import necessary scripts for get_started page. */ +require('App.ts'); + require('base_components/BaseContentDirective.ts'); require( 'components/common-layout-directives/common-elements/' + diff --git a/core/templates/dev/head/pages/interaction-specs.constants.ts b/core/templates/dev/head/pages/interaction-specs.constants.ts index fc6d44e28917..264923565e0b 100644 --- a/core/templates/dev/head/pages/interaction-specs.constants.ts +++ b/core/templates/dev/head/pages/interaction-specs.constants.ts @@ -16,4 +16,6 @@ * @fileoverview Constant file for the INTERACTION_SPECS constant. */ +var oppia = require('AppInit.ts').module; + oppia.constant('INTERACTION_SPECS', GLOBALS.INTERACTION_SPECS); diff --git a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.controller.ts b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.controller.ts index d24ff3f4f88f..23a6b7427e7c 100644 --- a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.controller.ts +++ b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.controller.ts @@ -23,6 +23,8 @@ require('services/SiteAnalyticsService.ts'); require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('stewardsLandingPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.scripts.ts b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.scripts.ts index ca352161ec34..2b366079c89d 100644 --- a/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.scripts.ts +++ b/core/templates/dev/head/pages/landing-pages/stewards-landing-page/stewards-landing-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the stewards landing page. */ +require('App.ts'); + require( 'pages/landing-pages/stewards-landing-page/' + 'stewards-landing-page.controller.ts'); diff --git a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.constants.ts b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.constants.ts index d7bfc90a17ff..b42c9a4589ee 100644 --- a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.constants.ts +++ b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.constants.ts @@ -18,6 +18,8 @@ // Note: This oppia constant needs to be keep in sync with // AVAILABLE_LANDING_PAGES constant defined in feconf.py file. +var oppia = require('AppInit.ts').module; + oppia.constant('TOPIC_LANDING_PAGE_DATA', { maths: { fractions: { diff --git a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.controller.ts b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.controller.ts index b912385030d6..fb1f1bdad511 100644 --- a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.controller.ts +++ b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.controller.ts @@ -30,6 +30,8 @@ require('services/SiteAnalyticsService.ts'); require( 'pages/landing-pages/topic-landing-page/topic-landing-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicLandingPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.scripts.ts b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.scripts.ts index 90fb618addec..c0229e80bc1b 100644 --- a/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.scripts.ts +++ b/core/templates/dev/head/pages/landing-pages/topic-landing-page/topic-landing-page.scripts.ts @@ -16,5 +16,7 @@ * @fileoverview Directive scripts for landing page. */ +require('App.ts'); + require( 'pages/landing-pages/topic-landing-page/topic-landing-page.controller.ts'); diff --git a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.constants.ts b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.constants.ts index e139c11e9daa..99065336327a 100644 --- a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.constants.ts +++ b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the Learner dashboard. */ +var oppia = require('AppInit.ts').module; + oppia.constant('LEARNER_DASHBOARD_SECTION_I18N_IDS', { INCOMPLETE: 'I18N_LEARNER_DASHBOARD_INCOMPLETE_SECTION', COMPLETED: 'I18N_LEARNER_DASHBOARD_COMPLETED_SECTION', diff --git a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.controller.ts b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.controller.ts index a0ff5feec797..c9e205422b7b 100644 --- a/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.controller.ts +++ b/core/templates/dev/head/pages/learner-dashboard-page/learner-dashboard-page.controller.ts @@ -16,6 +16,8 @@ * @fileoverview Controllers for the creator dashboard. */ +require('App.ts'); + require('base_components/BaseContentDirective.ts'); require( 'components/common-layout-directives/common-elements/' + @@ -43,6 +45,8 @@ require('services/UserService.ts'); require('pages/learner-dashboard-page/learner-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('learnerDashboardPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/learner-dashboard-page/suggestion-modal/suggestion-modal-for-learner-dashboard.service.ts b/core/templates/dev/head/pages/learner-dashboard-page/suggestion-modal/suggestion-modal-for-learner-dashboard.service.ts index 20cad917eb89..3b28dbc2d1cf 100644 --- a/core/templates/dev/head/pages/learner-dashboard-page/suggestion-modal/suggestion-modal-for-learner-dashboard.service.ts +++ b/core/templates/dev/head/pages/learner-dashboard-page/suggestion-modal/suggestion-modal-for-learner-dashboard.service.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SuggestionModalService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionModalForLearnerDashboardService', [ '$rootScope', '$uibModal', 'UrlInterpolationService', function($rootScope, $uibModal, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/library-page/library-footer/library-footer.directive.ts b/core/templates/dev/head/pages/library-page/library-footer/library-footer.directive.ts index 9d54536a12a4..39f3e6cd4399 100644 --- a/core/templates/dev/head/pages/library-page/library-footer/library-footer.directive.ts +++ b/core/templates/dev/head/pages/library-page/library-footer/library-footer.directive.ts @@ -20,6 +20,8 @@ require('pages/OppiaFooterDirective.ts'); require('pages/library-page/library-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('libraryFooter', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/library-page/library-page.constants.ts b/core/templates/dev/head/pages/library-page/library-page.constants.ts index 057e3f2d6bff..32be86aebf44 100644 --- a/core/templates/dev/head/pages/library-page/library-page.constants.ts +++ b/core/templates/dev/head/pages/library-page/library-page.constants.ts @@ -20,6 +20,8 @@ // be same as the LIBRARY_PAGE_MODE constants defined in feconf.py. For example // LIBRARY_PAGE_MODES.GROUP should have the same value as // LIBRARY_PAGE_MODE_GROUP in feconf.py. +var oppia = require('AppInit.ts').module; + oppia.constant('LIBRARY_PAGE_MODES', { GROUP: 'group', INDEX: 'index', diff --git a/core/templates/dev/head/pages/library-page/library-page.directive.ts b/core/templates/dev/head/pages/library-page/library-page.directive.ts index a28f239181d0..dcf81384f963 100755 --- a/core/templates/dev/head/pages/library-page/library-page.directive.ts +++ b/core/templates/dev/head/pages/library-page/library-page.directive.ts @@ -37,6 +37,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('pages/library-page/library-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('libraryPage', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/library-page/library-page.scripts.ts b/core/templates/dev/head/pages/library-page/library-page.scripts.ts index 6ccc1f24e726..895443dc024d 100644 --- a/core/templates/dev/head/pages/library-page/library-page.scripts.ts +++ b/core/templates/dev/head/pages/library-page/library-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directives required in library. */ +require('App.ts'); + require('pages/library-page/library-page.directive.ts'); require('pages/library-page/library-footer/library-footer.directive.ts'); require('pages/library-page/search-bar/search-bar.directive.ts'); diff --git a/core/templates/dev/head/pages/library-page/search-bar/search-bar.directive.ts b/core/templates/dev/head/pages/library-page/search-bar/search-bar.directive.ts index d92d3d64c96a..617da95cc6c8 100755 --- a/core/templates/dev/head/pages/library-page/search-bar/search-bar.directive.ts +++ b/core/templates/dev/head/pages/library-page/search-bar/search-bar.directive.ts @@ -27,6 +27,8 @@ require('services/NavigationService.ts'); require('services/SearchService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('searchBar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/library-page/search-results/activity-tiles-infinity-grid.directive.ts b/core/templates/dev/head/pages/library-page/search-results/activity-tiles-infinity-grid.directive.ts index 4186444e529d..93088d714a46 100644 --- a/core/templates/dev/head/pages/library-page/search-results/activity-tiles-infinity-grid.directive.ts +++ b/core/templates/dev/head/pages/library-page/search-results/activity-tiles-infinity-grid.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SearchService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('activityTilesInfinityGrid', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/library-page/search-results/search-results.directive.ts b/core/templates/dev/head/pages/library-page/search-results/search-results.directive.ts index 1e38cdad667d..04b3731afaaf 100644 --- a/core/templates/dev/head/pages/library-page/search-results/search-results.directive.ts +++ b/core/templates/dev/head/pages/library-page/search-results/search-results.directive.ts @@ -24,6 +24,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/SiteAnalyticsService.ts'); require('services/UserService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('searchResults', [ '$q', 'UrlInterpolationService', function($q, UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/maintenance-page/maintenance-page.controller.ts b/core/templates/dev/head/pages/maintenance-page/maintenance-page.controller.ts index 700b1df315cd..ad83d7ead0f4 100644 --- a/core/templates/dev/head/pages/maintenance-page/maintenance-page.controller.ts +++ b/core/templates/dev/head/pages/maintenance-page/maintenance-page.controller.ts @@ -16,8 +16,12 @@ * @fileoverview The controller for the maintenance page. */ +require('App.ts'); + require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.controller('Maintenance', [ '$rootScope', '$scope', 'UrlInterpolationService', 'DEV_MODE', function($rootScope, $scope, UrlInterpolationService, DEV_MODE) { diff --git a/core/templates/dev/head/pages/moderator-page/moderator-page.controller.ts b/core/templates/dev/head/pages/moderator-page/moderator-page.controller.ts index 965c26d47ec6..7b2bb337d920 100644 --- a/core/templates/dev/head/pages/moderator-page/moderator-page.controller.ts +++ b/core/templates/dev/head/pages/moderator-page/moderator-page.controller.ts @@ -53,6 +53,8 @@ require('base_components/BaseContentDirective.ts'); require('services/AlertsService.ts'); require('services/DateTimeFormatService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('moderatorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/moderator-page/moderator-page.scripts.ts b/core/templates/dev/head/pages/moderator-page/moderator-page.scripts.ts index 867b3e8f14de..faa0013d1e1b 100644 --- a/core/templates/dev/head/pages/moderator-page/moderator-page.scripts.ts +++ b/core/templates/dev/head/pages/moderator-page/moderator-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Scripts for the Oppia moderator page. */ +require('App.ts'); + require('pages/moderator-page/moderator-page.controller.ts'); diff --git a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.controller.ts b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.controller.ts index f51b659acf03..0872452a4534 100644 --- a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.controller.ts +++ b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.controller.ts @@ -20,6 +20,8 @@ require('base_components/BaseContentDirective.ts'); require('services/DateTimeFormatService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('notificationsDashboardPage', [ 'UrlInterpolationService', function( UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.scripts.ts b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.scripts.ts index ed7548ac8c21..d53631fe5ff1 100644 --- a/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.scripts.ts +++ b/core/templates/dev/head/pages/notifications-dashboard-page/notifications-dashboard-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the user's notifications dashboard. */ +require('App.ts'); + require( 'pages/notifications-dashboard-page/' + 'notifications-dashboard-page.controller.ts'); diff --git a/core/templates/dev/head/pages/practice-session-page/practice-session-page.constants.ts b/core/templates/dev/head/pages/practice-session-page/practice-session-page.constants.ts index 56a0dd0a4692..48792da91315 100644 --- a/core/templates/dev/head/pages/practice-session-page/practice-session-page.constants.ts +++ b/core/templates/dev/head/pages/practice-session-page/practice-session-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the practice session. */ +var oppia = require('AppInit.ts').module; + oppia.constant('TOTAL_QUESTIONS', 20); oppia.constant( diff --git a/core/templates/dev/head/pages/practice-session-page/practice-session-page.controller.ts b/core/templates/dev/head/pages/practice-session-page/practice-session-page.controller.ts index 51ea2ba49cd5..e3381350cb66 100644 --- a/core/templates/dev/head/pages/practice-session-page/practice-session-page.controller.ts +++ b/core/templates/dev/head/pages/practice-session-page/practice-session-page.controller.ts @@ -31,6 +31,8 @@ require('services/contextual/UrlService.ts'); require('pages/practice-session-page/practice-session-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('practiceSessionPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/practice-session-page/practice-session-page.scripts.ts b/core/templates/dev/head/pages/practice-session-page/practice-session-page.scripts.ts index 37a7ed5523d2..b23454b3eaff 100644 --- a/core/templates/dev/head/pages/practice-session-page/practice-session-page.scripts.ts +++ b/core/templates/dev/head/pages/practice-session-page/practice-session-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directive scripts for the practice session. */ +require('App.ts'); + require('pages/practice-session-page/practice-session-page.controller.ts'); diff --git a/core/templates/dev/head/pages/preferences-page/preferences-page.controller.ts b/core/templates/dev/head/pages/preferences-page/preferences-page.controller.ts index b11bafa46aeb..ff7f7e6cd7bb 100644 --- a/core/templates/dev/head/pages/preferences-page/preferences-page.controller.ts +++ b/core/templates/dev/head/pages/preferences-page/preferences-page.controller.ts @@ -31,6 +31,8 @@ require('services/AlertsService.ts'); require('services/UserService.ts'); require('services/UtilsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('preferencesPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/preferences-page/preferences-page.scripts.ts b/core/templates/dev/head/pages/preferences-page/preferences-page.scripts.ts index 825cda323dfb..44a32ff12369 100644 --- a/core/templates/dev/head/pages/preferences-page/preferences-page.scripts.ts +++ b/core/templates/dev/head/pages/preferences-page/preferences-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the Oppia 'edit preferences' page. */ +require('App.ts'); + require('pages/OppiaFooterDirective.ts'); require('pages/preferences-page/preferences-page.controller.ts'); diff --git a/core/templates/dev/head/pages/privacy-page/privacy-page.controller.ts b/core/templates/dev/head/pages/privacy-page/privacy-page.controller.ts index 466c5feeec91..d77a7bdf4464 100644 --- a/core/templates/dev/head/pages/privacy-page/privacy-page.controller.ts +++ b/core/templates/dev/head/pages/privacy-page/privacy-page.controller.ts @@ -16,5 +16,7 @@ * @fileoverview Directives required in privacy page. */ +require('App.ts'); + require('pages/OppiaFooterDirective.ts'); require('base_components/BaseContentDirective.ts'); diff --git a/core/templates/dev/head/pages/profile-page/profile-page.controller.ts b/core/templates/dev/head/pages/profile-page/profile-page.controller.ts index bf3c6907b334..7af9e0f5ce60 100644 --- a/core/templates/dev/head/pages/profile-page/profile-page.controller.ts +++ b/core/templates/dev/head/pages/profile-page/profile-page.controller.ts @@ -27,6 +27,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/UserService.ts'); require('services/DateTimeFormatService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('profilePage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/profile-page/profile-page.scripts.ts b/core/templates/dev/head/pages/profile-page/profile-page.scripts.ts index 3c4f280dbf72..68d96e5d93fc 100644 --- a/core/templates/dev/head/pages/profile-page/profile-page.scripts.ts +++ b/core/templates/dev/head/pages/profile-page/profile-page.scripts.ts @@ -16,5 +16,7 @@ * @fileoverview Directive scripts for the Oppia profile page. */ +require('App.ts'); + require('pages/OppiaFooterDirective.ts'); require('pages/profile-page/profile-page.controller.ts'); diff --git a/core/templates/dev/head/pages/review-test-page/review-test-engine.service.ts b/core/templates/dev/head/pages/review-test-page/review-test-engine.service.ts index fc6e73e69fda..bea3d7f74664 100644 --- a/core/templates/dev/head/pages/review-test-page/review-test-engine.service.ts +++ b/core/templates/dev/head/pages/review-test-page/review-test-engine.service.ts @@ -16,6 +16,8 @@ * @fileoverview Utility service for the review tests. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ReviewTestEngineService', [ function() { return { diff --git a/core/templates/dev/head/pages/review-test-page/review-test-page.constants.ts b/core/templates/dev/head/pages/review-test-page/review-test-page.constants.ts index ff19f1e60b14..dd9eef0c3684 100644 --- a/core/templates/dev/head/pages/review-test-page/review-test-page.constants.ts +++ b/core/templates/dev/head/pages/review-test-page/review-test-page.constants.ts @@ -16,4 +16,6 @@ * @fileoverview Constants for the review tests. */ +var oppia = require('AppInit.ts').module; + oppia.constant('REVIEW_TEST_DATA_URL', '/review_test_handler/data/'); diff --git a/core/templates/dev/head/pages/review-test-page/review-test-page.directive.ts b/core/templates/dev/head/pages/review-test-page/review-test-page.directive.ts index 7a1efe2a856e..732d6597a207 100644 --- a/core/templates/dev/head/pages/review-test-page/review-test-page.directive.ts +++ b/core/templates/dev/head/pages/review-test-page/review-test-page.directive.ts @@ -30,6 +30,8 @@ require('pages/review-test-page/review-test-engine.service.ts'); require('services/AlertsService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('reviewTestPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/signup-page/signup-page.controller.ts b/core/templates/dev/head/pages/signup-page/signup-page.controller.ts index 793b6b0a224f..8153e63a9d4b 100644 --- a/core/templates/dev/head/pages/signup-page/signup-page.controller.ts +++ b/core/templates/dev/head/pages/signup-page/signup-page.controller.ts @@ -26,6 +26,8 @@ require('services/UserService.ts'); require('services/contextual/UrlService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('signupPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/signup-page/signup-page.scripts.ts b/core/templates/dev/head/pages/signup-page/signup-page.scripts.ts index c3edf1b7048b..1b8d865f179f 100644 --- a/core/templates/dev/head/pages/signup-page/signup-page.scripts.ts +++ b/core/templates/dev/head/pages/signup-page/signup-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directive scripts for the Oppia profile page. */ +require('App.ts'); + require('pages/signup-page/signup-page.controller.ts'); diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/skill-concept-card-editor.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/skill-concept-card-editor.directive.ts index fb734992bcc8..10c6b2c0cb33 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/skill-concept-card-editor.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/skill-concept-card-editor.directive.ts @@ -35,6 +35,8 @@ require('services/GenerateContentIdService.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillConceptCardEditor', [ 'GenerateContentIdService', 'SkillEditorStateService', 'SkillUpdateService', 'SubtitledHtmlObjectFactory', 'UrlInterpolationService', diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/worked-example-editor.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/worked-example-editor.directive.ts index 4a9f2733fa8c..f167c557d867 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/worked-example-editor.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-concept-card-editor/worked-example-editor.directive.ts @@ -21,6 +21,8 @@ require('domain/skill/SkillUpdateService.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('pages/skill-editor-page/services/skill-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('workedExampleEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-description-editor/skill-description-editor.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-description-editor/skill-description-editor.directive.ts index c64718b40cbe..21d532b75f63 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-description-editor/skill-description-editor.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-description-editor/skill-description-editor.directive.ts @@ -23,6 +23,8 @@ require('pages/skill-editor-page/services/skill-editor-state.service.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillDescriptionEditor', [ 'SkillEditorStateService', 'SkillObjectFactory', 'SkillUpdateService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-editor-main-tab.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-editor-main-tab.directive.ts index a365914abd61..11ff15d34fb6 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-editor-main-tab.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-editor-main-tab.directive.ts @@ -29,6 +29,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); require('pages/skill-editor-page/services/skill-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillEditorMainTab', [ 'SkillEditorStateService', 'UrlInterpolationService', function(SkillEditorStateService, UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/misconception-editor.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/misconception-editor.directive.ts index 50decc922f67..cb2134b51dc6 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/misconception-editor.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/misconception-editor.directive.ts @@ -20,6 +20,8 @@ require('domain/skill/SkillUpdateService.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('pages/skill-editor-page/services/skill-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('misconceptionEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/skill-misconceptions-editor.directive.ts b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/skill-misconceptions-editor.directive.ts index a794e90b16ce..f843aef785dd 100644 --- a/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/skill-misconceptions-editor.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/editor-tab/skill-misconceptions-editor/skill-misconceptions-editor.directive.ts @@ -30,6 +30,8 @@ require('pages/skill-editor-page/services/skill-editor-state.service.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillMisconceptionsEditor', [ 'SkillEditorStateService', 'SkillUpdateService', 'UrlInterpolationService', function( diff --git a/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar-breadcrumb.directive.ts index 39bc650b8bad..e6a9a3edb890 100644 --- a/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar-breadcrumb.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/skill-editor-page/services/skill-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillEditorNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar.directive.ts b/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar.directive.ts index 92c8a915da3e..bef17424815f 100644 --- a/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/navbar/skill-editor-navbar.directive.ts @@ -28,6 +28,8 @@ require('services/AlertsService.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillEditorNavbar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/questions-tab/questions-tab.directive.ts b/core/templates/dev/head/pages/skill-editor-page/questions-tab/questions-tab.directive.ts index a9784fabced2..d802236a4e58 100644 --- a/core/templates/dev/head/pages/skill-editor-page/questions-tab/questions-tab.directive.ts +++ b/core/templates/dev/head/pages/skill-editor-page/questions-tab/questions-tab.directive.ts @@ -35,6 +35,8 @@ require('services/AlertsService.ts'); require('services/QuestionsListService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('questionsTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-routing.service.ts b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-routing.service.ts index cd7e52d04294..da4853ae9224 100644 --- a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-routing.service.ts +++ b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-routing.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service that handles routing for the skill editor page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SkillEditorRoutingService', [ '$interval', '$location', '$rootScope', '$timeout', '$window', function( diff --git a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.ts b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.ts index 9f4dde89b663..5499f64daa70 100644 --- a/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.ts +++ b/core/templates/dev/head/pages/skill-editor-page/services/skill-editor-state.service.ts @@ -28,6 +28,8 @@ require('services/QuestionsListService.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SkillEditorStateService', [ '$rootScope', 'AlertsService', 'EditableSkillBackendApiService', 'QuestionBackendApiService', 'QuestionsListService', diff --git a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.constants.ts b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.constants.ts index 8144cf809dc7..b7977fbf93f6 100644 --- a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.constants.ts +++ b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the skill editor page. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'SKILL_RIGHTS_URL_TEMPLATE', '/skill_editor_handler/rights/'); diff --git a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.controller.ts b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.controller.ts index 62a98d948cc5..a09ee8edf3ab 100644 --- a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.controller.ts +++ b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.controller.ts @@ -107,6 +107,8 @@ require('pages/skill-editor-page/questions-tab/questions-tab.directive.ts'); require('pages/skill-editor-page/skill-editor-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillEditorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.scripts.ts b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.scripts.ts index c38b1dcdf797..bb5472c4667e 100644 --- a/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.scripts.ts +++ b/core/templates/dev/head/pages/skill-editor-page/skill-editor-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the skill editor page. */ +require('App.ts'); + require('pages/skill-editor-page/navbar/skill-editor-navbar.directive.ts'); require( 'pages/skill-editor-page/navbar/skill-editor-navbar-breadcrumb.directive.ts'); diff --git a/core/templates/dev/head/pages/splash-page/splash-page.controller.ts b/core/templates/dev/head/pages/splash-page/splash-page.controller.ts index af29dbee11ee..bf9077724d14 100644 --- a/core/templates/dev/head/pages/splash-page/splash-page.controller.ts +++ b/core/templates/dev/head/pages/splash-page/splash-page.controller.ts @@ -16,6 +16,8 @@ * @fileoverview Data and controllers for the Oppia splash page. */ +var oppia = require('AppInit.ts').module; + require('base_components/BaseContentDirective.ts'); require('domain/utilities/UrlInterpolationService.ts'); diff --git a/core/templates/dev/head/pages/splash-page/splash-page.scripts.ts b/core/templates/dev/head/pages/splash-page/splash-page.scripts.ts index c0b26a4db781..77d45366571f 100644 --- a/core/templates/dev/head/pages/splash-page/splash-page.scripts.ts +++ b/core/templates/dev/head/pages/splash-page/splash-page.scripts.ts @@ -16,4 +16,5 @@ * @fileoverview Directive scripts for the Oppia splash page. */ +require('App.ts'); require('pages/splash-page/splash-page.controller.ts'); diff --git a/core/templates/dev/head/pages/story-editor-page/editor-tab/story-editor.directive.ts b/core/templates/dev/head/pages/story-editor-page/editor-tab/story-editor.directive.ts index f33c8db4c864..633a53d354eb 100644 --- a/core/templates/dev/head/pages/story-editor-page/editor-tab/story-editor.directive.ts +++ b/core/templates/dev/head/pages/story-editor-page/editor-tab/story-editor.directive.ts @@ -28,6 +28,8 @@ require('services/AlertsService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-editor-page/editor-tab/story-node-editor.directive.ts b/core/templates/dev/head/pages/story-editor-page/editor-tab/story-node-editor.directive.ts index 7caad8f0b6f3..197f53741352 100644 --- a/core/templates/dev/head/pages/story-editor-page/editor-tab/story-node-editor.directive.ts +++ b/core/templates/dev/head/pages/story-editor-page/editor-tab/story-node-editor.directive.ts @@ -23,6 +23,8 @@ require('services/AlertsService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyNodeEditor', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar-breadcrumb.directive.ts index baa7188521c8..315372c3b24a 100644 --- a/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar-breadcrumb.directive.ts @@ -24,6 +24,8 @@ require('services/contextual/UrlService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyEditorNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar.directive.ts b/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar.directive.ts index 5901fcd79ebe..76b08876802f 100644 --- a/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar.directive.ts +++ b/core/templates/dev/head/pages/story-editor-page/navbar/story-editor-navbar.directive.ts @@ -25,6 +25,8 @@ require('services/contextual/UrlService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyEditorNavbar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.ts b/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.ts index f19e953c935c..78994896117c 100644 --- a/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.ts +++ b/core/templates/dev/head/pages/story-editor-page/services/story-editor-state.service.ts @@ -25,6 +25,8 @@ require('services/AlertsService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StoryEditorStateService', [ '$rootScope', 'AlertsService', 'EditableStoryBackendApiService', 'StoryObjectFactory', 'UndoRedoService', diff --git a/core/templates/dev/head/pages/story-editor-page/story-editor-page.constants.ts b/core/templates/dev/head/pages/story-editor-page/story-editor-page.constants.ts index 877c15b1190d..c47b500e863e 100644 --- a/core/templates/dev/head/pages/story-editor-page/story-editor-page.constants.ts +++ b/core/templates/dev/head/pages/story-editor-page/story-editor-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Primary controller for the story editor page. */ +var oppia = require('AppInit.ts').module; + oppia.constant('NODE_ID_PREFIX', 'node_'); oppia.constant( 'EVENT_STORY_INITIALIZED', 'storyInitialized'); diff --git a/core/templates/dev/head/pages/story-editor-page/story-editor-page.controller.ts b/core/templates/dev/head/pages/story-editor-page/story-editor-page.controller.ts index 81df680f74c2..a4fe87d9a450 100644 --- a/core/templates/dev/head/pages/story-editor-page/story-editor-page.controller.ts +++ b/core/templates/dev/head/pages/story-editor-page/story-editor-page.controller.ts @@ -109,6 +109,8 @@ require('services/contextual/UrlService.ts'); require('pages/story-editor-page/story-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyEditorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-editor-page/story-editor-page.scripts.ts b/core/templates/dev/head/pages/story-editor-page/story-editor-page.scripts.ts index 43cee3ad78b9..1630d4fed2ab 100644 --- a/core/templates/dev/head/pages/story-editor-page/story-editor-page.scripts.ts +++ b/core/templates/dev/head/pages/story-editor-page/story-editor-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the story editor page. */ +require('App.ts'); + require( 'pages/story-editor-page/navbar/story-editor-navbar-breadcrumb.directive.ts'); require('pages/story-editor-page/navbar/story-editor-navbar.directive.ts'); diff --git a/core/templates/dev/head/pages/story-viewer-page/chapters-list/story-viewer-chapters-list.directive.ts b/core/templates/dev/head/pages/story-viewer-page/chapters-list/story-viewer-chapters-list.directive.ts index 09d131086a1b..4a9565cd8c4f 100644 --- a/core/templates/dev/head/pages/story-viewer-page/chapters-list/story-viewer-chapters-list.directive.ts +++ b/core/templates/dev/head/pages/story-viewer-page/chapters-list/story-viewer-chapters-list.directive.ts @@ -27,6 +27,8 @@ require('services/AlertsService.ts'); require('services/PageTitleService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.animation('.oppia-story-animate-slide', function() { return { enter: function(element) { diff --git a/core/templates/dev/head/pages/story-viewer-page/navbar-breadcrumb/story-viewer-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/story-viewer-page/navbar-breadcrumb/story-viewer-navbar-breadcrumb.directive.ts index f59d378e1854..8e3bd689f655 100644 --- a/core/templates/dev/head/pages/story-viewer-page/navbar-breadcrumb/story-viewer-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/story-viewer-page/navbar-breadcrumb/story-viewer-navbar-breadcrumb.directive.ts @@ -20,6 +20,8 @@ require('domain/story_viewer/StoryViewerBackendApiService.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyViewerNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.directive.ts b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.directive.ts index f723e38fcc9f..c4fce18c1b88 100644 --- a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.directive.ts +++ b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.directive.ts @@ -32,6 +32,8 @@ require('services/AlertsService.ts'); require('services/PageTitleService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storyViewerPage', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.scripts.ts b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.scripts.ts index 37a35c9eda98..21eb71711783 100644 --- a/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.scripts.ts +++ b/core/templates/dev/head/pages/story-viewer-page/story-viewer-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Directives required in story viewer. */ +require('App.ts'); + require('pages/story-viewer-page/story-viewer-page.directive.ts'); diff --git a/core/templates/dev/head/pages/teach-page/teach-page.controller.ts b/core/templates/dev/head/pages/teach-page/teach-page.controller.ts index 57decdf03a20..7f42bab25b9c 100644 --- a/core/templates/dev/head/pages/teach-page/teach-page.controller.ts +++ b/core/templates/dev/head/pages/teach-page/teach-page.controller.ts @@ -24,6 +24,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); require('services/SiteAnalyticsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('teachPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/teach-page/teach-page.scripts.ts b/core/templates/dev/head/pages/teach-page/teach-page.scripts.ts index 83598d596cdf..4e6095da92f2 100644 --- a/core/templates/dev/head/pages/teach-page/teach-page.scripts.ts +++ b/core/templates/dev/head/pages/teach-page/teach-page.scripts.ts @@ -16,4 +16,6 @@ * @fileoverview Controllers for the teach page. */ +require('App.ts'); + require('pages/teach-page/teach-page.controller.ts'); diff --git a/core/templates/dev/head/pages/terms-page/terms-page.controller.ts b/core/templates/dev/head/pages/terms-page/terms-page.controller.ts index c64d09b881f4..278be30d152c 100644 --- a/core/templates/dev/head/pages/terms-page/terms-page.controller.ts +++ b/core/templates/dev/head/pages/terms-page/terms-page.controller.ts @@ -16,4 +16,6 @@ * @fileoverview Directives required in terms page. */ +require('App.ts'); + require('base_components/BaseContentDirective.ts'); diff --git a/core/templates/dev/head/pages/thanks-page/thanks-page.controller.ts b/core/templates/dev/head/pages/thanks-page/thanks-page.controller.ts index 7bcea2af66f8..92a52e154ada 100644 --- a/core/templates/dev/head/pages/thanks-page/thanks-page.controller.ts +++ b/core/templates/dev/head/pages/thanks-page/thanks-page.controller.ts @@ -16,6 +16,8 @@ * @fileoverview Controllers for the 'thanks' page. */ +require('App.ts'); + require('base_components/BaseContentDirective.ts'); require( 'components/common-layout-directives/common-elements/' + @@ -23,6 +25,8 @@ require( require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.controller('Thanks', [ '$scope', 'UrlInterpolationService', function( diff --git a/core/templates/dev/head/pages/topic-editor-page/editor-tab/stories-list.directive.ts b/core/templates/dev/head/pages/topic-editor-page/editor-tab/stories-list.directive.ts index bba701f28b7e..1d81cd1c1df9 100644 --- a/core/templates/dev/head/pages/topic-editor-page/editor-tab/stories-list.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/editor-tab/stories-list.directive.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/topic-editor-page/services/topic-editor-state.service.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storiesList', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/editor-tab/topic-editor-tab.directive.ts b/core/templates/dev/head/pages/topic-editor-page/editor-tab/topic-editor-tab.directive.ts index d443deee2699..bb57e9eb6db9 100644 --- a/core/templates/dev/head/pages/topic-editor-page/editor-tab/topic-editor-tab.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/editor-tab/topic-editor-tab.directive.ts @@ -24,6 +24,8 @@ require('domain/topic/TopicUpdateService.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('pages/topic-editor-page/services/topic-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicEditorTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar-breadcrumb.directive.ts index 9d1a5f222dc8..3d0663f893ef 100644 --- a/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar-breadcrumb.directive.ts @@ -20,6 +20,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('pages/topic-editor-page/services/topic-editor-state.service.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicEditorNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar.directive.ts b/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar.directive.ts index 06ca0392d839..ca95e6d85007 100644 --- a/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/navbar/topic-editor-navbar.directive.ts @@ -27,6 +27,8 @@ require('pages/topic-editor-page/services/topic-editor-state.service.ts'); require('services/AlertsService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicEditorNavbar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/questions-tab/questions-tab.directive.ts b/core/templates/dev/head/pages/topic-editor-page/questions-tab/questions-tab.directive.ts index 0be9265fe2bf..bbe190424919 100644 --- a/core/templates/dev/head/pages/topic-editor-page/questions-tab/questions-tab.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/questions-tab/questions-tab.directive.ts @@ -36,6 +36,8 @@ require('services/AlertsService.ts'); require('services/contextual/UrlService.ts'); require('services/QuestionsListService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('questionsTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-routing.service.ts b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-routing.service.ts index 1ec4a05798bf..14e3ed84839f 100644 --- a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-routing.service.ts +++ b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-routing.service.ts @@ -16,6 +16,8 @@ * @fileoverview Service that handles routing for the topic editor page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('TopicEditorRoutingService', [ '$interval', '$location', '$rootScope', '$timeout', '$window', function( diff --git a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.ts b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.ts index ea51efb1c9f8..4240301d9354 100644 --- a/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.ts +++ b/core/templates/dev/head/pages/topic-editor-page/services/topic-editor-state.service.ts @@ -31,6 +31,8 @@ require('services/QuestionsListService.ts'); require('pages/topic-editor-page/topic-editor-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TopicEditorStateService', [ '$rootScope', 'AlertsService', 'EditableStoryBackendApiService', 'EditableTopicBackendApiService', diff --git a/core/templates/dev/head/pages/topic-editor-page/subtopics-list-tab/subtopics-list-tab.directive.ts b/core/templates/dev/head/pages/topic-editor-page/subtopics-list-tab/subtopics-list-tab.directive.ts index 616c0732999b..3aaf248adead 100644 --- a/core/templates/dev/head/pages/topic-editor-page/subtopics-list-tab/subtopics-list-tab.directive.ts +++ b/core/templates/dev/head/pages/topic-editor-page/subtopics-list-tab/subtopics-list-tab.directive.ts @@ -22,6 +22,8 @@ require('domain/topic/TopicUpdateService.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('pages/topic-editor-page/services/topic-editor-state.service.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('subtopicsListTab', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.constants.ts b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.constants.ts index 50918c31e17a..0ba03fd07e61 100644 --- a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.constants.ts +++ b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the topic editor page. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'TOPIC_NAME_INPUT_FOCUS_LABEL', 'topicNameInputFocusLabel'); diff --git a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.controller.ts b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.controller.ts index 7b87948a9b96..ec83f5937e29 100644 --- a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.controller.ts +++ b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.controller.ts @@ -123,6 +123,8 @@ require('services/contextual/UrlService.ts'); require('pages/topic-editor-page/topic-editor-page.constants.ts'); require('pages/interaction-specs.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicEditorPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.scripts.ts b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.scripts.ts index 9271864ab0b5..0756796220d4 100644 --- a/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.scripts.ts +++ b/core/templates/dev/head/pages/topic-editor-page/topic-editor-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the topic editor page. */ +require('App.ts'); + require( 'pages/topic-editor-page/navbar/topic-editor-navbar-breadcrumb.directive.ts'); require('pages/topic-editor-page/navbar/topic-editor-navbar.directive.ts'); diff --git a/core/templates/dev/head/pages/topic-viewer-page/navbar-breadcrumb/topic-viewer-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/topic-viewer-page/navbar-breadcrumb/topic-viewer-navbar-breadcrumb.directive.ts index 92e1dc15fa20..e9a7ba4c76b5 100644 --- a/core/templates/dev/head/pages/topic-viewer-page/navbar-breadcrumb/topic-viewer-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/topic-viewer-page/navbar-breadcrumb/topic-viewer-navbar-breadcrumb.directive.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicViewerNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-viewer-page/stories-list/stories-list.directive.ts b/core/templates/dev/head/pages/topic-viewer-page/stories-list/stories-list.directive.ts index 6fd584e023d1..279edfa98279 100644 --- a/core/templates/dev/head/pages/topic-viewer-page/stories-list/stories-list.directive.ts +++ b/core/templates/dev/head/pages/topic-viewer-page/stories-list/stories-list.directive.ts @@ -21,6 +21,8 @@ require('components/summary-tile/story-summary-tile.directive.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('storiesList', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.controller.ts b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.controller.ts index 682c1a659ac7..aaee3f18afdb 100644 --- a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.controller.ts +++ b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.controller.ts @@ -26,6 +26,8 @@ require('services/AlertsService.ts'); require('services/PageTitleService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicViewerPage', ['UrlInterpolationService', function( UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.scripts.ts b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.scripts.ts index f4f7eedf3880..2d7e4c300018 100644 --- a/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.scripts.ts +++ b/core/templates/dev/head/pages/topic-viewer-page/topic-viewer-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the topic viewer. */ +require('App.ts'); + require( 'pages/topic-viewer-page/navbar-breadcrumb/' + 'topic-viewer-navbar-breadcrumb.directive.ts'); diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar-breadcrumb.directive.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar-breadcrumb.directive.ts index b627a43db05a..aa16f791a97e 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar-breadcrumb.directive.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar-breadcrumb.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicsAndSkillsDashboardNavbarBreadcrumb', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar.directive.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar.directive.ts index 5930120c9173..45f2fc7367b3 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar.directive.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/navbar/topics-and-skills-dashboard-navbar.directive.ts @@ -25,6 +25,8 @@ require( 'pages/topics-and-skills-dashboard-page/' + 'topics-and-skills-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicsAndSkillsDashboardNavbar', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/skills-list/skills-list.directive.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/skills-list/skills-list.directive.ts index 618648d875a8..ecf957690ef3 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/skills-list/skills-list.directive.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/skills-list/skills-list.directive.ts @@ -29,6 +29,8 @@ require( 'pages/topics-and-skills-dashboard-page/' + 'topics-and-skills-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('skillsList', [ '$http', 'AlertsService', 'UrlInterpolationService', function( diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topic-selector/topic-selector.directive.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topic-selector/topic-selector.directive.ts index b63b011644fa..e89fd2d7959b 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topic-selector/topic-selector.directive.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topic-selector/topic-selector.directive.ts @@ -18,6 +18,8 @@ require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('selectTopics', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.constants.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.constants.ts index f3badbae0f96..2ed50b677499 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.constants.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for the topics and skills dashboard. */ +var oppia = require('AppInit.ts').module; + oppia.constant( 'EVENT_TYPE_TOPIC_CREATION_ENABLED', 'topicCreationEnabled'); diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.controller.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.controller.ts index bb664dbbe265..9ea9a8f7e810 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.controller.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.controller.ts @@ -23,14 +23,6 @@ require( require( 'pages/topics-and-skills-dashboard-page/skills-list/' + 'skills-list.directive.ts'); -require( - 'pages/topics-and-skills-dashboard-page/navbar/' + - 'topics-and-skills-dashboard-navbar-breadcrumb.directive.ts' -); -require( - 'pages/topics-and-skills-dashboard-page/navbar/' + - 'topics-and-skills-dashboard-navbar.directive.ts' -); require( 'pages/topics-and-skills-dashboard-page/topics-list/' + 'topics-list.directive.ts'); @@ -48,6 +40,8 @@ require( 'pages/topics-and-skills-dashboard-page/' + 'topics-and-skills-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicsAndSkillsDashboardPage', [ 'UrlInterpolationService', function( UrlInterpolationService) { diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.scripts.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.scripts.ts index fe59dbef2675..68242f665ff3 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.scripts.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-and-skills-dashboard-page.scripts.ts @@ -16,6 +16,8 @@ * @fileoverview Directive scripts for the topics and skills dashboard. */ +require('App.ts'); + require( 'pages/topics-and-skills-dashboard-page/navbar/' + 'topics-and-skills-dashboard-navbar-breadcrumb.directive.ts' diff --git a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-list/topics-list.directive.ts b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-list/topics-list.directive.ts index 88532c08046f..da71b3aa06f7 100644 --- a/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-list/topics-list.directive.ts +++ b/core/templates/dev/head/pages/topics-and-skills-dashboard-page/topics-list/topics-list.directive.ts @@ -24,6 +24,8 @@ require( 'pages/topics-and-skills-dashboard-page/' + 'topics-and-skills-dashboard-page.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('topicsList', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/core/templates/dev/head/services/AlertsService.ts b/core/templates/dev/head/services/AlertsService.ts index 5791162054ff..f74dad93b4f1 100644 --- a/core/templates/dev/head/services/AlertsService.ts +++ b/core/templates/dev/head/services/AlertsService.ts @@ -16,6 +16,8 @@ * @fileoverview Factory for handling warnings and info messages. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AlertsService', ['$log', function($log) { var AlertsService = { /** diff --git a/core/templates/dev/head/services/AssetsBackendApiService.ts b/core/templates/dev/head/services/AssetsBackendApiService.ts index 279b1db85692..6b8794aaa079 100644 --- a/core/templates/dev/head/services/AssetsBackendApiService.ts +++ b/core/templates/dev/head/services/AssetsBackendApiService.ts @@ -22,6 +22,8 @@ require('domain/utilities/FileDownloadRequestObjectFactory.ts'); require('domain/utilities/ImageFileObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AssetsBackendApiService', [ '$http', '$q', 'AudioFileObjectFactory', 'FileDownloadRequestObjectFactory', 'ImageFileObjectFactory', 'UrlInterpolationService', 'DEV_MODE', diff --git a/core/templates/dev/head/services/AudioPlayerService.ts b/core/templates/dev/head/services/AudioPlayerService.ts index 6f5cd8daaadb..e9a7c67b4052 100644 --- a/core/templates/dev/head/services/AudioPlayerService.ts +++ b/core/templates/dev/head/services/AudioPlayerService.ts @@ -16,6 +16,8 @@ * @fileoverview Service to operate the playback of audio. */ +var oppia = require('AppInit.ts').module; + oppia.factory('AudioPlayerService', [ '$q', '$timeout', 'AssetsBackendApiService', 'AudioTranslationManagerService', 'ContextService', 'ngAudio', diff --git a/core/templates/dev/head/services/AutogeneratedAudioPlayerService.ts b/core/templates/dev/head/services/AutogeneratedAudioPlayerService.ts index f5c7c4a77d61..5aefb5a3a680 100644 --- a/core/templates/dev/head/services/AutogeneratedAudioPlayerService.ts +++ b/core/templates/dev/head/services/AutogeneratedAudioPlayerService.ts @@ -19,6 +19,8 @@ require('services/SpeechSynthesisChunkerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('AutogeneratedAudioPlayerService', [ 'SpeechSynthesisChunkerService', function(SpeechSynthesisChunkerService) { diff --git a/core/templates/dev/head/services/AutoplayedVideosService.ts b/core/templates/dev/head/services/AutoplayedVideosService.ts index 163e2131fbc2..1763d7c46e4b 100644 --- a/core/templates/dev/head/services/AutoplayedVideosService.ts +++ b/core/templates/dev/head/services/AutoplayedVideosService.ts @@ -29,6 +29,8 @@ // component and use that id instead to determine whether to suppress // autoplaying. +var oppia = require('AppInit.ts').module; + oppia.factory('AutoplayedVideosService', [function() { var autoplayedVideosDict = {}; return { diff --git a/core/templates/dev/head/services/CodeNormalizerService.ts b/core/templates/dev/head/services/CodeNormalizerService.ts index 3b82c2ba7cee..d6640ce73967 100644 --- a/core/templates/dev/head/services/CodeNormalizerService.ts +++ b/core/templates/dev/head/services/CodeNormalizerService.ts @@ -17,6 +17,8 @@ * and pencil code interactions. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CodeNormalizerService', [function() { var removeLeadingWhitespace = function(str) { return str.replace(/^\s+/g, ''); diff --git a/core/templates/dev/head/services/ComputeGraphService.ts b/core/templates/dev/head/services/ComputeGraphService.ts index 9524cf5314da..358a7da94702 100644 --- a/core/templates/dev/head/services/ComputeGraphService.ts +++ b/core/templates/dev/head/services/ComputeGraphService.ts @@ -17,6 +17,8 @@ * exploration. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ComputeGraphService', [ 'INTERACTION_SPECS', function(INTERACTION_SPECS) { var _computeGraphData = function(initStateId, states) { diff --git a/core/templates/dev/head/services/ConstructTranslationIdsService.ts b/core/templates/dev/head/services/ConstructTranslationIdsService.ts index 75a3199ae23e..73b9ba4bb2c3 100755 --- a/core/templates/dev/head/services/ConstructTranslationIdsService.ts +++ b/core/templates/dev/head/services/ConstructTranslationIdsService.ts @@ -16,6 +16,8 @@ * @fileoverview Service to dynamically construct translation ids for i18n. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ConstructTranslationIdsService', [ function() { return { diff --git a/core/templates/dev/head/services/ContextService.ts b/core/templates/dev/head/services/ContextService.ts index 884c3f2462a1..4a94d7ed1c59 100644 --- a/core/templates/dev/head/services/ContextService.ts +++ b/core/templates/dev/head/services/ContextService.ts @@ -19,6 +19,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ContextService', [ 'UrlService', 'EXPLORATION_EDITOR_TAB_CONTEXT', 'PAGE_CONTEXT', function(UrlService, EXPLORATION_EDITOR_TAB_CONTEXT, PAGE_CONTEXT) { diff --git a/core/templates/dev/head/services/DateTimeFormatService.ts b/core/templates/dev/head/services/DateTimeFormatService.ts index 6795d07e53a3..eb652bb0d032 100644 --- a/core/templates/dev/head/services/DateTimeFormatService.ts +++ b/core/templates/dev/head/services/DateTimeFormatService.ts @@ -17,6 +17,8 @@ * since the Epoch to human-readable dates. */ +var oppia = require('AppInit.ts').module; + oppia.factory('DateTimeFormatService', ['$filter', function($filter) { return { // Returns just the time if the local datetime representation has the diff --git a/core/templates/dev/head/services/DebouncerService.ts b/core/templates/dev/head/services/DebouncerService.ts index c21cee8c2112..a8e302bc877d 100644 --- a/core/templates/dev/head/services/DebouncerService.ts +++ b/core/templates/dev/head/services/DebouncerService.ts @@ -16,6 +16,8 @@ * @fileoverview Service for debouncing function calls. */ +var oppia = require('AppInit.ts').module; + oppia.factory('DebouncerService', [function() { return { // Returns a function that will not be triggered as long as it continues to diff --git a/core/templates/dev/head/services/EditabilityService.ts b/core/templates/dev/head/services/EditabilityService.ts index d2a4486daddb..eb06745df6c9 100644 --- a/core/templates/dev/head/services/EditabilityService.ts +++ b/core/templates/dev/head/services/EditabilityService.ts @@ -20,6 +20,8 @@ // the current active version? Previous versions should not be editable. // TODO(SD): Remove translatable part from this service after translation tab // will get implemented. +var oppia = require('AppInit.ts').module; + oppia.factory('EditabilityService', [function() { var isEditable = false; var isTranslatable = false; diff --git a/core/templates/dev/head/services/ExplorationFeaturesBackendApiService.ts b/core/templates/dev/head/services/ExplorationFeaturesBackendApiService.ts index 8b84502d00aa..a48a50ca2927 100644 --- a/core/templates/dev/head/services/ExplorationFeaturesBackendApiService.ts +++ b/core/templates/dev/head/services/ExplorationFeaturesBackendApiService.ts @@ -19,6 +19,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationFeaturesBackendApiService', [ '$http', 'UrlInterpolationService', 'EXPLORATION_FEATURES_URL', function($http, UrlInterpolationService, EXPLORATION_FEATURES_URL) { diff --git a/core/templates/dev/head/services/ExplorationFeaturesService.ts b/core/templates/dev/head/services/ExplorationFeaturesService.ts index bf92ce17ce78..f995a4b8eb13 100644 --- a/core/templates/dev/head/services/ExplorationFeaturesService.ts +++ b/core/templates/dev/head/services/ExplorationFeaturesService.ts @@ -17,6 +17,8 @@ * the exploration editor. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationFeaturesService', [function() { var settings = { areParametersEnabled: false, diff --git a/core/templates/dev/head/services/ExplorationHtmlFormatterService.ts b/core/templates/dev/head/services/ExplorationHtmlFormatterService.ts index d03b53fc22e1..30d90dbcded7 100644 --- a/core/templates/dev/head/services/ExplorationHtmlFormatterService.ts +++ b/core/templates/dev/head/services/ExplorationHtmlFormatterService.ts @@ -23,6 +23,8 @@ require('services/HtmlEscaperService.ts'); // A service that provides a number of utility functions useful to both the // editor and player. +var oppia = require('AppInit.ts').module; + oppia.factory('ExplorationHtmlFormatterService', [ '$filter', 'ExtensionTagAssemblerService', 'HtmlEscaperService', 'INTERACTION_SPECS', diff --git a/core/templates/dev/head/services/ExtensionTagAssemblerService.ts b/core/templates/dev/head/services/ExtensionTagAssemblerService.ts index bed9c8dc6dd2..9bbdde99d164 100644 --- a/core/templates/dev/head/services/ExtensionTagAssemblerService.ts +++ b/core/templates/dev/head/services/ExtensionTagAssemblerService.ts @@ -20,6 +20,8 @@ require('filters/string-utility-filters/camel-case-to-hyphens.filter.ts'); // Service for assembling extension tags (for interactions). +var oppia = require('AppInit.ts').module; + oppia.factory('ExtensionTagAssemblerService', [ '$filter', 'HtmlEscaperService', function($filter, HtmlEscaperService) { return { diff --git a/core/templates/dev/head/services/GenerateContentIdService.ts b/core/templates/dev/head/services/GenerateContentIdService.ts index 97053d9d7506..982ca33eafd9 100644 --- a/core/templates/dev/head/services/GenerateContentIdService.ts +++ b/core/templates/dev/head/services/GenerateContentIdService.ts @@ -17,6 +17,8 @@ * SubtitledHtml domain objects. */ +var oppia = require('AppInit.ts').module; + oppia.factory('GenerateContentIdService', [ 'COMPONENT_NAME_FEEDBACK', 'COMPONENT_NAME_HINT', 'COMPONENT_NAME_WORKED_EXAMPLE', function( diff --git a/core/templates/dev/head/services/HtmlEscaperService.ts b/core/templates/dev/head/services/HtmlEscaperService.ts index 8baf0372cb06..02ea2714810a 100644 --- a/core/templates/dev/head/services/HtmlEscaperService.ts +++ b/core/templates/dev/head/services/HtmlEscaperService.ts @@ -16,6 +16,8 @@ * @fileoverview Service for HTML serialization and escaping. */ +var oppia = require('AppInit.ts').module; + oppia.factory('HtmlEscaperService', ['$log', function($log) { var htmlEscaper = { objToEscapedJson: function(obj) { diff --git a/core/templates/dev/head/services/IdGenerationService.ts b/core/templates/dev/head/services/IdGenerationService.ts index e6544b171906..4221a54f6775 100644 --- a/core/templates/dev/head/services/IdGenerationService.ts +++ b/core/templates/dev/head/services/IdGenerationService.ts @@ -16,6 +16,8 @@ * @fileoverview Service for generating random IDs. */ +var oppia = require('AppInit.ts').module; + oppia.factory('IdGenerationService', [function() { return { generateNewId: function() { diff --git a/core/templates/dev/head/services/ImprovementCardService.ts b/core/templates/dev/head/services/ImprovementCardService.ts index 91ccee251723..56294b5ec371 100644 --- a/core/templates/dev/head/services/ImprovementCardService.ts +++ b/core/templates/dev/head/services/ImprovementCardService.ts @@ -30,6 +30,8 @@ * - Card.prototype.getActionButtons() -> ImprovementActionButton[] */ +var oppia = require('AppInit.ts').module; + oppia.factory('ImprovementCardService', [ 'PlaythroughImprovementCardObjectFactory', function(PlaythroughImprovementCardObjectFactory) { diff --git a/core/templates/dev/head/services/ImprovementsService.ts b/core/templates/dev/head/services/ImprovementsService.ts index af074dffd1eb..2eabe3f18a6d 100644 --- a/core/templates/dev/head/services/ImprovementsService.ts +++ b/core/templates/dev/head/services/ImprovementsService.ts @@ -17,6 +17,8 @@ * states based on statistics. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ImprovementsService', [function() { var INTERACTION_IDS_REQUIRED_TO_BE_RESOLVED = ['TextInput']; diff --git a/core/templates/dev/head/services/LocalStorageService.ts b/core/templates/dev/head/services/LocalStorageService.ts index 12e2bc8354ed..c62e9d7b9ca6 100644 --- a/core/templates/dev/head/services/LocalStorageService.ts +++ b/core/templates/dev/head/services/LocalStorageService.ts @@ -22,6 +22,8 @@ require('domain/exploration/ExplorationDraftObjectFactory.ts'); // // Note that the draft is only saved if localStorage exists and works // (i.e. has storage capacity). +var oppia = require('AppInit.ts').module; + oppia.factory('LocalStorageService', [ 'ExplorationDraftObjectFactory', function(ExplorationDraftObjectFactory) { diff --git a/core/templates/dev/head/services/MessengerService.ts b/core/templates/dev/head/services/MessengerService.ts index eee2eae662b2..c737e262ab7d 100644 --- a/core/templates/dev/head/services/MessengerService.ts +++ b/core/templates/dev/head/services/MessengerService.ts @@ -19,6 +19,8 @@ * be attempted due to cross-domain security issues.) */ +var oppia = require('AppInit.ts').module; + oppia.factory('MessengerService', ['$log', '$window', function($log, $window) { var isPositiveInteger = function(n) { return (typeof n === 'number' && n % 1 === 0 && n > 0); diff --git a/core/templates/dev/head/services/NavigationService.ts b/core/templates/dev/head/services/NavigationService.ts index cd865d4f2a22..05a5507cc65a 100644 --- a/core/templates/dev/head/services/NavigationService.ts +++ b/core/templates/dev/head/services/NavigationService.ts @@ -16,6 +16,8 @@ * @fileoverview Factory for navigating the top navigation bar with * tab and shift-tab. */ +var oppia = require('AppInit.ts').module; + oppia.factory('NavigationService', [function() { var navigation = { activeMenuName: '', diff --git a/core/templates/dev/head/services/NestedDirectivesRecursionTimeoutPreventionService.ts b/core/templates/dev/head/services/NestedDirectivesRecursionTimeoutPreventionService.ts index 9926c75b1d56..65fa0217cf11 100644 --- a/core/templates/dev/head/services/NestedDirectivesRecursionTimeoutPreventionService.ts +++ b/core/templates/dev/head/services/NestedDirectivesRecursionTimeoutPreventionService.ts @@ -17,6 +17,8 @@ * in nested directives. See: http://stackoverflow.com/q/14430655 */ +var oppia = require('AppInit.ts').module; + oppia.factory('NestedDirectivesRecursionTimeoutPreventionService', [ '$compile', function($compile) { diff --git a/core/templates/dev/head/services/PageTitleService.ts b/core/templates/dev/head/services/PageTitleService.ts index 439fb68c20b1..146fdc3021df 100644 --- a/core/templates/dev/head/services/PageTitleService.ts +++ b/core/templates/dev/head/services/PageTitleService.ts @@ -16,6 +16,8 @@ * @fileoverview Service to set the title of the page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('PageTitleService', ['$document', function($document) { var _setPageTitle = function(title) { $document[0].title = title; diff --git a/core/templates/dev/head/services/PlaythroughIssuesBackendApiService.ts b/core/templates/dev/head/services/PlaythroughIssuesBackendApiService.ts index 8c182599763d..2838319ef9a2 100644 --- a/core/templates/dev/head/services/PlaythroughIssuesBackendApiService.ts +++ b/core/templates/dev/head/services/PlaythroughIssuesBackendApiService.ts @@ -21,6 +21,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughIssuesBackendApiService', [ '$http', 'PlaythroughIssueObjectFactory', 'PlaythroughObjectFactory', 'UrlInterpolationService', 'FETCH_ISSUES_URL', 'FETCH_PLAYTHROUGH_URL', diff --git a/core/templates/dev/head/services/PlaythroughIssuesService.ts b/core/templates/dev/head/services/PlaythroughIssuesService.ts index 788089d15fb9..a4af853e122e 100644 --- a/core/templates/dev/head/services/PlaythroughIssuesService.ts +++ b/core/templates/dev/head/services/PlaythroughIssuesService.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/PlaythroughIssuesBackendApiService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughIssuesService', [ '$uibModal', 'PlaythroughIssuesBackendApiService', 'UrlInterpolationService', 'ISSUE_TYPE_CYCLIC_STATE_TRANSITIONS', 'ISSUE_TYPE_EARLY_QUIT', diff --git a/core/templates/dev/head/services/PlaythroughService.ts b/core/templates/dev/head/services/PlaythroughService.ts index 578279735324..e28c88479cc3 100644 --- a/core/templates/dev/head/services/PlaythroughService.ts +++ b/core/templates/dev/head/services/PlaythroughService.ts @@ -24,6 +24,8 @@ require('services/ExplorationFeaturesService.ts'); require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PlaythroughService', [ '$http', 'ExplorationFeaturesService', 'LearnerActionObjectFactory', 'PlaythroughObjectFactory', 'StopwatchObjectFactory', diff --git a/core/templates/dev/head/services/PromoBarService.ts b/core/templates/dev/head/services/PromoBarService.ts index 37a1439092fa..c22526d4e4e5 100644 --- a/core/templates/dev/head/services/PromoBarService.ts +++ b/core/templates/dev/head/services/PromoBarService.ts @@ -18,6 +18,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PromoBarService', [ '$http', '$q', 'ENABLE_PROMO_BAR', function($http, $q, ENABLE_PROMO_BAR) { diff --git a/core/templates/dev/head/services/QuestionsListService.ts b/core/templates/dev/head/services/QuestionsListService.ts index 10b73cf3dfcf..470a737a4af6 100644 --- a/core/templates/dev/head/services/QuestionsListService.ts +++ b/core/templates/dev/head/services/QuestionsListService.ts @@ -21,6 +21,8 @@ require('domain/question/QuestionBackendApiService.ts'); require('services/ContextService.ts'); require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('QuestionsListService', [ '$rootScope', 'QuestionBackendApiService', 'EVENT_QUESTION_SUMMARIES_INITIALIZED', function( diff --git a/core/templates/dev/head/services/RteHelperService.ts b/core/templates/dev/head/services/RteHelperService.ts index 263f70bab24e..31035ed4394b 100644 --- a/core/templates/dev/head/services/RteHelperService.ts +++ b/core/templates/dev/head/services/RteHelperService.ts @@ -18,6 +18,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('RteHelperService', [ '$document', '$filter', '$interpolate', '$log', '$uibModal', 'ContextService', 'FocusManagerService', 'HtmlEscaperService', diff --git a/core/templates/dev/head/services/SchemaDefaultValueService.ts b/core/templates/dev/head/services/SchemaDefaultValueService.ts index ba7f9a86df03..10a83c65b34f 100644 --- a/core/templates/dev/head/services/SchemaDefaultValueService.ts +++ b/core/templates/dev/head/services/SchemaDefaultValueService.ts @@ -17,6 +17,8 @@ * SchemaBasedList item. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SchemaDefaultValueService', [function() { return { // TODO(sll): Rewrite this to take validators into account, so that diff --git a/core/templates/dev/head/services/SchemaUndefinedLastElementService.ts b/core/templates/dev/head/services/SchemaUndefinedLastElementService.ts index abd6963dd0a5..ad6f1c60d143 100644 --- a/core/templates/dev/head/services/SchemaUndefinedLastElementService.ts +++ b/core/templates/dev/head/services/SchemaUndefinedLastElementService.ts @@ -17,6 +17,8 @@ * is undefined. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SchemaUndefinedLastElementService', [function() { return { // Returns true if the input value, taken as the last element in a list, diff --git a/core/templates/dev/head/services/SearchService.ts b/core/templates/dev/head/services/SearchService.ts index e428a45dd828..763cf464316f 100644 --- a/core/templates/dev/head/services/SearchService.ts +++ b/core/templates/dev/head/services/SearchService.ts @@ -18,6 +18,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SearchService', [ '$http', '$log', '$rootScope', '$translate', 'SEARCH_DATA_URL', function($http, $log, $rootScope, $translate, SEARCH_DATA_URL) { diff --git a/core/templates/dev/head/services/SiteAnalyticsService.ts b/core/templates/dev/head/services/SiteAnalyticsService.ts index c8c4f80cca6f..6a7966d8b0e1 100644 --- a/core/templates/dev/head/services/SiteAnalyticsService.ts +++ b/core/templates/dev/head/services/SiteAnalyticsService.ts @@ -22,6 +22,8 @@ // Note that events are only sent if the CAN_SEND_ANALYTICS_EVENTS flag is // turned on. This flag must be turned on explicitly by the application // owner in feconf.py. +var oppia = require('AppInit.ts').module; + oppia.factory('SiteAnalyticsService', ['$window', function($window) { var CAN_SEND_ANALYTICS_EVENTS = constants.CAN_SEND_ANALYTICS_EVENTS; // For definitions of the various arguments, please see: diff --git a/core/templates/dev/head/services/SpeechSynthesisChunkerService.ts b/core/templates/dev/head/services/SpeechSynthesisChunkerService.ts index 7c4df8e21a3f..c725f96a0773 100644 --- a/core/templates/dev/head/services/SpeechSynthesisChunkerService.ts +++ b/core/templates/dev/head/services/SpeechSynthesisChunkerService.ts @@ -23,6 +23,8 @@ * Credits to Peter Woolley and Brett Zamir. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SpeechSynthesisChunkerService', [ '$timeout', 'RTE_COMPONENT_SPECS', function($timeout, RTE_COMPONENT_SPECS) { // Max number of characters to fit into one chunk. diff --git a/core/templates/dev/head/services/StateRulesStatsService.ts b/core/templates/dev/head/services/StateRulesStatsService.ts index ebda2c4ab64b..dbbde2bf9c21 100644 --- a/core/templates/dev/head/services/StateRulesStatsService.ts +++ b/core/templates/dev/head/services/StateRulesStatsService.ts @@ -16,6 +16,8 @@ * @fileoverview Factory for calculating the statistics of a particular state. */ +var oppia = require('AppInit.ts').module; + oppia.factory('StateRulesStatsService', [ '$http', '$injector', '$q', 'AngularNameService', 'AnswerClassificationService', 'ContextService', 'FractionObjectFactory', diff --git a/core/templates/dev/head/services/StateTopAnswersStatsBackendApiService.ts b/core/templates/dev/head/services/StateTopAnswersStatsBackendApiService.ts index 22718ce50e40..dc6df08e1682 100644 --- a/core/templates/dev/head/services/StateTopAnswersStatsBackendApiService.ts +++ b/core/templates/dev/head/services/StateTopAnswersStatsBackendApiService.ts @@ -18,6 +18,8 @@ require('services/services.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateTopAnswersStatsBackendApiService', [ '$http', 'UrlInterpolationService', 'STATE_ANSWER_STATS_URL', function($http, UrlInterpolationService, STATE_ANSWER_STATS_URL) { diff --git a/core/templates/dev/head/services/StateTopAnswersStatsService.ts b/core/templates/dev/head/services/StateTopAnswersStatsService.ts index 17990b963cab..252834d9f92d 100644 --- a/core/templates/dev/head/services/StateTopAnswersStatsService.ts +++ b/core/templates/dev/head/services/StateTopAnswersStatsService.ts @@ -24,6 +24,8 @@ require( 'pages/exploration-player-page/services/answer-classification.service.ts'); require('services/ContextService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('StateTopAnswersStatsService', [ '$injector', 'AngularNameService', 'AnswerClassificationService', 'AnswerStatsObjectFactory', 'ContextService', 'ExplorationStatesService', diff --git a/core/templates/dev/head/services/SuggestionModalService.ts b/core/templates/dev/head/services/SuggestionModalService.ts index f4248d94cf74..8106df9f0811 100644 --- a/core/templates/dev/head/services/SuggestionModalService.ts +++ b/core/templates/dev/head/services/SuggestionModalService.ts @@ -16,6 +16,8 @@ * @fileoverview Service to handle common code for suggestion modal display. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SuggestionModalService', [function() { return { SUGGESTION_ACCEPTED_MSG: 'This suggestion has already been ' + diff --git a/core/templates/dev/head/services/TranslationFileHashLoaderService.ts b/core/templates/dev/head/services/TranslationFileHashLoaderService.ts index bbd2c1daa8cc..a8341204d5ff 100755 --- a/core/templates/dev/head/services/TranslationFileHashLoaderService.ts +++ b/core/templates/dev/head/services/TranslationFileHashLoaderService.ts @@ -16,6 +16,8 @@ * @fileoverview Service to load the i18n translation file. */ +var oppia = require('AppInit.ts').module; + oppia.factory('TranslationFileHashLoaderService', [ '$http', '$q', 'UrlInterpolationService', function($http, $q, UrlInterpolationService) { diff --git a/core/templates/dev/head/services/UserService.ts b/core/templates/dev/head/services/UserService.ts index 2daa91c80e71..99018501e51c 100644 --- a/core/templates/dev/head/services/UserService.ts +++ b/core/templates/dev/head/services/UserService.ts @@ -19,6 +19,8 @@ require('services/contextual/UrlService.ts'); * @fileoverview Service for user data. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UserService', [ '$http', '$q', '$window', 'UrlInterpolationService', 'UrlService', 'UserInfoObjectFactory', 'DEFAULT_PROFILE_IMAGE_PATH', diff --git a/core/templates/dev/head/services/UtilsService.ts b/core/templates/dev/head/services/UtilsService.ts index e33ad221ba56..b75b2175ab6b 100644 --- a/core/templates/dev/head/services/UtilsService.ts +++ b/core/templates/dev/head/services/UtilsService.ts @@ -17,6 +17,8 @@ * used at multiple places in the codebase. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UtilsService', [function() { var utils = { isEmpty: function(obj) { diff --git a/core/templates/dev/head/services/ValidatorsService.ts b/core/templates/dev/head/services/ValidatorsService.ts index e4f98698500b..586b7f7d1691 100644 --- a/core/templates/dev/head/services/ValidatorsService.ts +++ b/core/templates/dev/head/services/ValidatorsService.ts @@ -19,6 +19,8 @@ require('filters/string-utility-filters/normalize-whitespace.filter.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ValidatorsService', [ '$filter', 'AlertsService', 'INVALID_NAME_CHARS', function($filter, AlertsService, INVALID_NAME_CHARS) { diff --git a/core/templates/dev/head/services/contextual/DeviceInfoService.ts b/core/templates/dev/head/services/contextual/DeviceInfoService.ts index b70cfadd8510..da678b8b08ab 100644 --- a/core/templates/dev/head/services/contextual/DeviceInfoService.ts +++ b/core/templates/dev/head/services/contextual/DeviceInfoService.ts @@ -17,6 +17,8 @@ */ // See: https://stackoverflow.com/a/11381730 +var oppia = require('AppInit.ts').module; + oppia.factory('DeviceInfoService', ['$window', function($window) { return { isMobileDevice: function() { diff --git a/core/templates/dev/head/services/contextual/UrlService.ts b/core/templates/dev/head/services/contextual/UrlService.ts index 590fdbed2f37..af92d5391dd7 100644 --- a/core/templates/dev/head/services/contextual/UrlService.ts +++ b/core/templates/dev/head/services/contextual/UrlService.ts @@ -17,6 +17,8 @@ * functions on $window to be mocked in unit tests. */ +var oppia = require('AppInit.ts').module; + oppia.factory('UrlService', ['$window', function($window) { return { // This function is for testing purposes (to mock $window.location) diff --git a/core/templates/dev/head/services/contextual/WindowDimensionsService.ts b/core/templates/dev/head/services/contextual/WindowDimensionsService.ts index 992c304420d5..5740d16683b3 100644 --- a/core/templates/dev/head/services/contextual/WindowDimensionsService.ts +++ b/core/templates/dev/head/services/contextual/WindowDimensionsService.ts @@ -16,6 +16,8 @@ * @fileoverview Service for computing the window dimensions. */ +var oppia = require('AppInit.ts').module; + oppia.factory('WindowDimensionsService', ['$window', function($window) { var onResizeHooks = []; angular.element($window).bind('resize', function() { diff --git a/core/templates/dev/head/services/services.constants.ts b/core/templates/dev/head/services/services.constants.ts index 02b76f94abf4..66720e652836 100644 --- a/core/templates/dev/head/services/services.constants.ts +++ b/core/templates/dev/head/services/services.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for shared services across Oppia. */ +var oppia = require('AppInit.ts').module; + oppia.constant('PAGE_CONTEXT', { EXPLORATION_EDITOR: 'editor', EXPLORATION_PLAYER: 'learner', diff --git a/core/templates/dev/head/services/stateful/BackgroundMaskService.ts b/core/templates/dev/head/services/stateful/BackgroundMaskService.ts index 83124ee0e870..afe09bb61333 100644 --- a/core/templates/dev/head/services/stateful/BackgroundMaskService.ts +++ b/core/templates/dev/head/services/stateful/BackgroundMaskService.ts @@ -17,6 +17,8 @@ * visible. */ +var oppia = require('AppInit.ts').module; + oppia.factory('BackgroundMaskService', [ function() { var maskIsActive = false; diff --git a/core/templates/dev/head/services/stateful/FocusManagerService.ts b/core/templates/dev/head/services/stateful/FocusManagerService.ts index 43530c4189b2..502a7fab9050 100644 --- a/core/templates/dev/head/services/stateful/FocusManagerService.ts +++ b/core/templates/dev/head/services/stateful/FocusManagerService.ts @@ -20,6 +20,8 @@ * page. */ +var oppia = require('AppInit.ts').module; + oppia.factory('FocusManagerService', [ '$rootScope', '$timeout', 'DeviceInfoService', 'IdGenerationService', 'LABEL_FOR_CLEARING_FOCUS', diff --git a/core/templates/dev/head/tests/FormBuilderTestPage.ts b/core/templates/dev/head/tests/FormBuilderTestPage.ts index 83f16c9433a5..7f643f39dcd2 100644 --- a/core/templates/dev/head/tests/FormBuilderTestPage.ts +++ b/core/templates/dev/head/tests/FormBuilderTestPage.ts @@ -16,6 +16,10 @@ * @fileoverview Controllers for the form builder test page. */ +require('App.ts'); + +var oppia = require('AppInit.ts').module; + oppia.controller('FormBuilderTestPage', [ '$scope', function($scope) { $scope.testText = 'abc{{paramUnicode1}}'; diff --git a/core/templates/dev/head/tests/FormOverlayDirective.ts b/core/templates/dev/head/tests/FormOverlayDirective.ts index 3ed4fa86ef8d..43a4991eb920 100644 --- a/core/templates/dev/head/tests/FormOverlayDirective.ts +++ b/core/templates/dev/head/tests/FormOverlayDirective.ts @@ -16,6 +16,10 @@ * @fileoverview Directive for form overlay. */ +require('App.ts'); + +var oppia = require('AppInit.ts').module; + oppia.directive('formOverlay', [ 'NestedDirectivesRecursionTimeoutPreventionService', 'UrlInterpolationService', diff --git a/core/templates/dev/head/tests/console_errors.html b/core/templates/dev/head/tests/console_errors.html index e3f916a89ce3..adee75a7322c 100644 --- a/core/templates/dev/head/tests/console_errors.html +++ b/core/templates/dev/head/tests/console_errors.html @@ -5,3 +5,16 @@ {% endblock %} + +{% block footer_js %} + {{ super() }} + + <% for (var chunk in htmlWebpackPlugin.files.js) { %> + <% if (webpackConfig.mode == 'production') { %> + + <% } else { %> + + <% } %> + <% } %> +{% endblock footer_js %} diff --git a/core/tests/karma.conf.ts b/core/tests/karma.conf.ts index 56beb81b885d..85a4169bc8b0 100644 --- a/core/tests/karma.conf.ts +++ b/core/tests/karma.conf.ts @@ -27,7 +27,6 @@ module.exports = function(config) { 'third_party/static/math-expressions-1.7.0/math-expressions.js', 'third_party/static/ckeditor-4.9.2/ckeditor.js', generatedJs, - 'local_compiled_js/core/templates/dev/head/AppInit.js', // Note that unexpected errors occur ("Cannot read property 'num' of // undefined" in MusicNotesInput.js) if the order of core/templates/... // and extensions/... are switched. The test framework may be flaky. @@ -35,11 +34,11 @@ module.exports = function(config) { 'core/templates/dev/head/**/*.directive.html', 'core/templates/dev/head/**/*.template.html', 'local_compiled_js/extensions/**/*.js', - 'core/templates/dev/head/**/*Spec.ts', - 'core/templates/dev/head/*Spec.ts', - 'core/templates/dev/head/**/*.spec.ts', - 'core/templates/dev/head/*.spec.ts', - 'extensions/**/*Spec.ts', + // This is a file that is generated on running the run_frontend_tests.sh + // script. This generated file is a combination of all the spec files + // since Karma is unable to run tests on multiple files due to some + // unknown reason. + 'core/templates/dev/head/combined-tests.spec.ts', { pattern: 'extensions/**/*.png', watched: false, @@ -60,19 +59,6 @@ module.exports = function(config) { 'local_compiled_js/core/templates/dev/head/**/*-e2e.js', 'local_compiled_js/extensions/**/protractor.js', 'backend_prod_files/extensions/**', - // TODO(vojtechjelinek): add these back after the templateCache - // is repaired (#6960) - 'core/templates/dev/head/components/RatingDisplayDirectiveSpec.js', - ('core/templates/dev/head/pages/exploration-editor-page/editor-tab/' + - 'services/solution-verification.service.spec.ts'), - ('core/templates/dev/head/pages/exploration-editor-page/editor-tab/' + - 'state-name-editor/state-name-editor.directive.spec.ts'), - ('core/templates/dev/head/components/state-editor/state-content-editor/' + - 'state-content-editor.directive.spec.ts'), - ('core/templates/dev/head/components/state-editor/' + - 'state-interaction-editor/state-interaction-editor.directive.spec.ts'), - ('extensions/interactions/MusicNotesInput/directives/' + - 'MusicNotesInputSpec.ts') ], proxies: { // Karma serves files under the /base directory. @@ -158,7 +144,8 @@ module.exports = function(config) { resolve: { modules: [ 'core/templates/dev/head', - 'extensions' + 'extensions', + 'node_modules', ], }, module: { diff --git a/extensions/classifiers/CountVectorizerService.ts b/extensions/classifiers/CountVectorizerService.ts index f5847b9511b1..40c576fbdea4 100644 --- a/extensions/classifiers/CountVectorizerService.ts +++ b/extensions/classifiers/CountVectorizerService.ts @@ -23,6 +23,8 @@ * propagated here. */ +var oppia = require('AppInit.ts').module; + oppia.factory('CountVectorizerService', [function() { return { vectorize: function(tokens, vocabulary) { diff --git a/extensions/classifiers/PythonProgramTokenizer.ts b/extensions/classifiers/PythonProgramTokenizer.ts index 83fb2c1c1e69..36ee98eecf54 100644 --- a/extensions/classifiers/PythonProgramTokenizer.ts +++ b/extensions/classifiers/PythonProgramTokenizer.ts @@ -28,6 +28,8 @@ require('classifiers/classifiers-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PythonProgramTokenizer', [ '$log', 'PythonProgramTokenType', function($log, PythonProgramTokenType) { var groupOfRegEx = function(...params) { diff --git a/extensions/classifiers/SVMPredictionService.ts b/extensions/classifiers/SVMPredictionService.ts index f96ee1753fbc..abd4113121b5 100644 --- a/extensions/classifiers/SVMPredictionService.ts +++ b/extensions/classifiers/SVMPredictionService.ts @@ -28,6 +28,8 @@ require('domain/classifier/PredictionResultObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SVMPredictionService', [ '$log', 'PredictionResultObjectFactory', function($log, PredictionResultObjectFactory) { diff --git a/extensions/classifiers/TextInputTokenizer.ts b/extensions/classifiers/TextInputTokenizer.ts index 7b70d5ba8659..d866f67bc054 100644 --- a/extensions/classifiers/TextInputTokenizer.ts +++ b/extensions/classifiers/TextInputTokenizer.ts @@ -26,6 +26,8 @@ */ // TODO(anmol): Add functionality to add n_grams, remove stop words. +var oppia = require('AppInit.ts').module; + oppia.factory('TextInputTokenizer', [function() { return { generateTokens: function(textInput) { diff --git a/extensions/classifiers/WinnowingPreprocessingService.ts b/extensions/classifiers/WinnowingPreprocessingService.ts index 07d394631c11..860c002a532a 100644 --- a/extensions/classifiers/WinnowingPreprocessingService.ts +++ b/extensions/classifiers/WinnowingPreprocessingService.ts @@ -21,6 +21,8 @@ * same task. */ +var oppia = require('AppInit.ts').module; + oppia.factory('WinnowingPreprocessingService', [function() { var generateHashValue = function(tokens, tokenToId) { var hashVal = 0; diff --git a/extensions/classifiers/classifiers-extension.constants.ts b/extensions/classifiers/classifiers-extension.constants.ts index 7a3b82be7eb1..d67c006d5776 100644 --- a/extensions/classifiers/classifiers-extension.constants.ts +++ b/extensions/classifiers/classifiers-extension.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for classfiers extensions. */ +var oppia = require('AppInit.ts').module; + oppia.constant('PythonProgramTokenType', { COMMENT: 'COMMENT', NL: 'NL', diff --git a/extensions/interactions/CodeRepl/CodeReplPredictionService.ts b/extensions/interactions/CodeRepl/CodeReplPredictionService.ts index 3e1b990c6f17..216cea6c14ff 100644 --- a/extensions/interactions/CodeRepl/CodeReplPredictionService.ts +++ b/extensions/interactions/CodeRepl/CodeReplPredictionService.ts @@ -28,6 +28,8 @@ require('classifiers/WinnowingPreprocessingService.ts'); require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CodeReplPredictionService', [ 'CountVectorizerService', 'PythonProgramTokenType', 'PythonProgramTokenizer', 'SVMPredictionService', diff --git a/extensions/interactions/CodeRepl/directives/CodeReplRulesService.ts b/extensions/interactions/CodeRepl/directives/CodeReplRulesService.ts index a4c425518cf5..455ecc976b5e 100644 --- a/extensions/interactions/CodeRepl/directives/CodeReplRulesService.ts +++ b/extensions/interactions/CodeRepl/directives/CodeReplRulesService.ts @@ -19,6 +19,8 @@ require('filters/string-utility-filters/normalize-whitespace.filter.ts'); require('services/CodeNormalizerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CodeReplRulesService', [ '$filter', 'CodeNormalizerService', function($filter, CodeNormalizerService) { diff --git a/extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts b/extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts index 2d88816f17d4..9b98a81271de 100644 --- a/extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts +++ b/extensions/interactions/CodeRepl/directives/CodeReplValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('CodeReplValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/CodeRepl/directives/OppiaInteractiveCodeReplDirective.ts b/extensions/interactions/CodeRepl/directives/OppiaInteractiveCodeReplDirective.ts index 1e7d2bcec680..de80fd3e0f24 100644 --- a/extensions/interactions/CodeRepl/directives/OppiaInteractiveCodeReplDirective.ts +++ b/extensions/interactions/CodeRepl/directives/OppiaInteractiveCodeReplDirective.ts @@ -27,6 +27,8 @@ require( require('services/HtmlEscaperService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveCodeRepl', [ 'CodeReplRulesService', 'HtmlEscaperService', 'UrlInterpolationService', 'EVENT_NEW_CARD_AVAILABLE', diff --git a/extensions/interactions/CodeRepl/directives/OppiaResponseCodeReplDirective.ts b/extensions/interactions/CodeRepl/directives/OppiaResponseCodeReplDirective.ts index 8f526277ad12..3c5cb3e3dba7 100644 --- a/extensions/interactions/CodeRepl/directives/OppiaResponseCodeReplDirective.ts +++ b/extensions/interactions/CodeRepl/directives/OppiaResponseCodeReplDirective.ts @@ -24,6 +24,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseCodeRepl', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/CodeRepl/directives/OppiaShortResponseCodeReplDirective.ts b/extensions/interactions/CodeRepl/directives/OppiaShortResponseCodeReplDirective.ts index 291d8501e786..6b227dea99a3 100644 --- a/extensions/interactions/CodeRepl/directives/OppiaShortResponseCodeReplDirective.ts +++ b/extensions/interactions/CodeRepl/directives/OppiaShortResponseCodeReplDirective.ts @@ -25,6 +25,8 @@ require('filters/string-utility-filters/truncate-at-first-line.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseCodeRepl', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/Continue/directives/ContinueRulesService.ts b/extensions/interactions/Continue/directives/ContinueRulesService.ts index 9920b571dd5c..db4aaf5dcaaa 100644 --- a/extensions/interactions/Continue/directives/ContinueRulesService.ts +++ b/extensions/interactions/Continue/directives/ContinueRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ContinueRulesService', [function() { return {}; }]); diff --git a/extensions/interactions/Continue/directives/ContinueValidationService.ts b/extensions/interactions/Continue/directives/ContinueValidationService.ts index c7668dc403a1..606246dd4bb5 100644 --- a/extensions/interactions/Continue/directives/ContinueValidationService.ts +++ b/extensions/interactions/Continue/directives/ContinueValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ContinueValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/Continue/directives/OppiaInteractiveContinueDirective.ts b/extensions/interactions/Continue/directives/OppiaInteractiveContinueDirective.ts index 427ff05dbd29..35b1cf443b70 100644 --- a/extensions/interactions/Continue/directives/OppiaInteractiveContinueDirective.ts +++ b/extensions/interactions/Continue/directives/OppiaInteractiveContinueDirective.ts @@ -28,6 +28,8 @@ require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveContinue', [ 'ContinueRulesService', 'HtmlEscaperService', 'UrlInterpolationService', function(ContinueRulesService, HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/Continue/directives/OppiaResponseContinueDirective.ts b/extensions/interactions/Continue/directives/OppiaResponseContinueDirective.ts index 8e49d85a3642..dd6f02eb306b 100644 --- a/extensions/interactions/Continue/directives/OppiaResponseContinueDirective.ts +++ b/extensions/interactions/Continue/directives/OppiaResponseContinueDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseContinue', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/Continue/directives/OppiaShortResponseContinueDirective.ts b/extensions/interactions/Continue/directives/OppiaShortResponseContinueDirective.ts index b1e1ae62f582..b563b01f5b5a 100644 --- a/extensions/interactions/Continue/directives/OppiaShortResponseContinueDirective.ts +++ b/extensions/interactions/Continue/directives/OppiaShortResponseContinueDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseContinue', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputRulesService.ts b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputRulesService.ts index 7c4d9d36b8e1..66dc3cee2102 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputRulesService.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputRulesService.ts @@ -17,6 +17,8 @@ */ // Rules Service for DragAndDropSortInput interaction. +var oppia = require('AppInit.ts').module; + oppia.factory('DragAndDropSortInputRulesService', [function() { var checkEquality = function(answer, inputs) { for (var i = 0; i < answer.length; i++) { diff --git a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts index 5c4c5c55c894..0460511ddd54 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/DragAndDropSortInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('DragAndDropSortInputValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/DragAndDropSortInput/directives/OppiaInteractiveDragAndDropSortInputDirective.ts b/extensions/interactions/DragAndDropSortInput/directives/OppiaInteractiveDragAndDropSortInputDirective.ts index 603b27a0dbae..f3a9ddfe9707 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/OppiaInteractiveDragAndDropSortInputDirective.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/OppiaInteractiveDragAndDropSortInputDirective.ts @@ -26,6 +26,8 @@ require( require('services/HtmlEscaperService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveDragAndDropSortInput', [ 'DragAndDropSortInputRulesService', 'HtmlEscaperService', 'UrlInterpolationService', function( diff --git a/extensions/interactions/DragAndDropSortInput/directives/OppiaResponseDragAndDropSortInputDirective.ts b/extensions/interactions/DragAndDropSortInput/directives/OppiaResponseDragAndDropSortInputDirective.ts index 66adaf222b4f..27d6e5733029 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/OppiaResponseDragAndDropSortInputDirective.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/OppiaResponseDragAndDropSortInputDirective.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseDragAndDropSortInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/DragAndDropSortInput/directives/OppiaShortResponseDragAndDropSortInputDirective.ts b/extensions/interactions/DragAndDropSortInput/directives/OppiaShortResponseDragAndDropSortInputDirective.ts index 04e38b80d2e7..7d87e3d1b5b7 100644 --- a/extensions/interactions/DragAndDropSortInput/directives/OppiaShortResponseDragAndDropSortInputDirective.ts +++ b/extensions/interactions/DragAndDropSortInput/directives/OppiaShortResponseDragAndDropSortInputDirective.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseDragAndDropSortInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/EndExploration/directives/EndExplorationRulesService.ts b/extensions/interactions/EndExploration/directives/EndExplorationRulesService.ts index cf7ae45a1fd0..47a69233d343 100644 --- a/extensions/interactions/EndExploration/directives/EndExplorationRulesService.ts +++ b/extensions/interactions/EndExploration/directives/EndExplorationRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('EndExplorationRulesService', [function() { return {}; }]); diff --git a/extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts b/extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts index 1ecf4bd8e094..1143ad9d2d4e 100644 --- a/extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts +++ b/extensions/interactions/EndExploration/directives/EndExplorationValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('EndExplorationValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/EndExploration/directives/OppiaInteractiveEndExplorationDirective.ts b/extensions/interactions/EndExploration/directives/OppiaInteractiveEndExplorationDirective.ts index c0f669512c1a..2ad36d0e0bc6 100644 --- a/extensions/interactions/EndExploration/directives/OppiaInteractiveEndExplorationDirective.ts +++ b/extensions/interactions/EndExploration/directives/OppiaInteractiveEndExplorationDirective.ts @@ -25,6 +25,8 @@ require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); require('services/contextual/UrlService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveEndExploration', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/EndExploration/directives/OppiaResponseEndExplorationDirective.ts b/extensions/interactions/EndExploration/directives/OppiaResponseEndExplorationDirective.ts index 8f910b86774f..8ad6feafd6b7 100644 --- a/extensions/interactions/EndExploration/directives/OppiaResponseEndExplorationDirective.ts +++ b/extensions/interactions/EndExploration/directives/OppiaResponseEndExplorationDirective.ts @@ -20,6 +20,8 @@ * followed by the name of the arg. */ +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseEndExploration', [function() { return { restrict: 'E', diff --git a/extensions/interactions/EndExploration/directives/OppiaShortResponseEndExplorationDirective.ts b/extensions/interactions/EndExploration/directives/OppiaShortResponseEndExplorationDirective.ts index 4b59decd12f3..0db80a02c665 100644 --- a/extensions/interactions/EndExploration/directives/OppiaShortResponseEndExplorationDirective.ts +++ b/extensions/interactions/EndExploration/directives/OppiaShortResponseEndExplorationDirective.ts @@ -20,6 +20,8 @@ * followed by the name of the arg. */ +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseEndExploration', [function() { return { restrict: 'E', diff --git a/extensions/interactions/FractionInput/directives/FractionInputRulesService.ts b/extensions/interactions/FractionInput/directives/FractionInputRulesService.ts index dcb8b3d677dc..08a6b372c038 100644 --- a/extensions/interactions/FractionInput/directives/FractionInputRulesService.ts +++ b/extensions/interactions/FractionInput/directives/FractionInputRulesService.ts @@ -18,6 +18,8 @@ require('domain/objects/FractionObjectFactory.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('FractionInputRulesService', [ 'FractionObjectFactory', function(FractionObjectFactory) { diff --git a/extensions/interactions/FractionInput/directives/FractionInputValidationService.ts b/extensions/interactions/FractionInput/directives/FractionInputValidationService.ts index c36c343bf17c..012de2b71cb7 100644 --- a/extensions/interactions/FractionInput/directives/FractionInputValidationService.ts +++ b/extensions/interactions/FractionInput/directives/FractionInputValidationService.ts @@ -19,6 +19,8 @@ require('domain/objects/FractionObjectFactory.ts'); require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('FractionInputValidationService', [ 'FractionObjectFactory', 'baseInteractionValidationService', 'WARNING_TYPES', diff --git a/extensions/interactions/FractionInput/directives/OppiaInteractiveFractionInputDirective.ts b/extensions/interactions/FractionInput/directives/OppiaInteractiveFractionInputDirective.ts index d3d127832adb..29c642e79d8b 100644 --- a/extensions/interactions/FractionInput/directives/OppiaInteractiveFractionInputDirective.ts +++ b/extensions/interactions/FractionInput/directives/OppiaInteractiveFractionInputDirective.ts @@ -25,6 +25,8 @@ require('services/HtmlEscaperService.ts'); require('services/contextual/WindowDimensionsService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveFractionInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/FractionInput/directives/OppiaResponseFractionInputDirective.ts b/extensions/interactions/FractionInput/directives/OppiaResponseFractionInputDirective.ts index 676b77411894..f934f3975ef8 100644 --- a/extensions/interactions/FractionInput/directives/OppiaResponseFractionInputDirective.ts +++ b/extensions/interactions/FractionInput/directives/OppiaResponseFractionInputDirective.ts @@ -20,6 +20,8 @@ require('domain/objects/FractionObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseFractionInput', [ 'FractionObjectFactory', 'HtmlEscaperService', 'UrlInterpolationService', function( diff --git a/extensions/interactions/FractionInput/directives/OppiaShortResponseFractionInputDirective.ts b/extensions/interactions/FractionInput/directives/OppiaShortResponseFractionInputDirective.ts index f1a7a1458093..a340dd9eb2a7 100644 --- a/extensions/interactions/FractionInput/directives/OppiaShortResponseFractionInputDirective.ts +++ b/extensions/interactions/FractionInput/directives/OppiaShortResponseFractionInputDirective.ts @@ -20,6 +20,8 @@ require('domain/objects/FractionObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseFractionInput', [ 'FractionObjectFactory', 'HtmlEscaperService', 'UrlInterpolationService', function( diff --git a/extensions/interactions/GraphInput/directives/GraphDetailService.ts b/extensions/interactions/GraphInput/directives/GraphDetailService.ts index 657cfe7c62d5..656027c0a11b 100644 --- a/extensions/interactions/GraphInput/directives/GraphDetailService.ts +++ b/extensions/interactions/GraphInput/directives/GraphDetailService.ts @@ -16,6 +16,8 @@ * @fileoverview Detail service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('GraphDetailService', [function() { return { VERTEX_RADIUS: 6, diff --git a/extensions/interactions/GraphInput/directives/GraphInputRulesService.ts b/extensions/interactions/GraphInput/directives/GraphInputRulesService.ts index 9c93e6b56dc3..48e446010e49 100644 --- a/extensions/interactions/GraphInput/directives/GraphInputRulesService.ts +++ b/extensions/interactions/GraphInput/directives/GraphInputRulesService.ts @@ -18,6 +18,8 @@ require('interactions/GraphInput/directives/GraphUtilsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('GraphInputRulesService', [ 'GraphUtilsService', function(GraphUtilsService) { /** diff --git a/extensions/interactions/GraphInput/directives/GraphInputValidationService.ts b/extensions/interactions/GraphInput/directives/GraphInputValidationService.ts index 4b17163cee9a..0c35d1672327 100644 --- a/extensions/interactions/GraphInput/directives/GraphInputValidationService.ts +++ b/extensions/interactions/GraphInput/directives/GraphInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('GraphInputValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/GraphInput/directives/GraphUtilsService.ts b/extensions/interactions/GraphInput/directives/GraphUtilsService.ts index e58df6c25bf7..f89eb6ceb505 100644 --- a/extensions/interactions/GraphInput/directives/GraphUtilsService.ts +++ b/extensions/interactions/GraphInput/directives/GraphUtilsService.ts @@ -16,6 +16,8 @@ * @fileoverview Utils service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('GraphUtilsService', [function() { return { GRAPH_ADJACENCY_MODE: { diff --git a/extensions/interactions/GraphInput/directives/GraphVizDirective.ts b/extensions/interactions/GraphInput/directives/GraphVizDirective.ts index 7fb0914065c9..d3ee988d6f80 100644 --- a/extensions/interactions/GraphInput/directives/GraphVizDirective.ts +++ b/extensions/interactions/GraphInput/directives/GraphVizDirective.ts @@ -27,6 +27,8 @@ require('services/stateful/FocusManagerService.ts'); require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('graphViz', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/GraphInput/directives/OppiaInteractiveGraphInputDirective.ts b/extensions/interactions/GraphInput/directives/OppiaInteractiveGraphInputDirective.ts index e78fdbdff8ac..4664cc68a94c 100644 --- a/extensions/interactions/GraphInput/directives/OppiaInteractiveGraphInputDirective.ts +++ b/extensions/interactions/GraphInput/directives/OppiaInteractiveGraphInputDirective.ts @@ -30,6 +30,8 @@ require('services/HtmlEscaperService.ts'); require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveGraphInput', [ 'GraphInputRulesService', 'HtmlEscaperService', 'UrlInterpolationService', 'UrlService', 'EVENT_NEW_CARD_AVAILABLE', diff --git a/extensions/interactions/GraphInput/directives/OppiaResponseGraphInputDirective.ts b/extensions/interactions/GraphInput/directives/OppiaResponseGraphInputDirective.ts index 481e92247ddb..21a25cbab302 100644 --- a/extensions/interactions/GraphInput/directives/OppiaResponseGraphInputDirective.ts +++ b/extensions/interactions/GraphInput/directives/OppiaResponseGraphInputDirective.ts @@ -26,6 +26,8 @@ require('services/HtmlEscaperService.ts'); require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseGraphInput', [ 'GraphDetailService', 'HtmlEscaperService', 'UrlInterpolationService', 'GRAPH_INPUT_LEFT_MARGIN', diff --git a/extensions/interactions/GraphInput/directives/OppiaShortResponseGraphInputDirective.ts b/extensions/interactions/GraphInput/directives/OppiaShortResponseGraphInputDirective.ts index 356e8d6ca91f..fd604de526cf 100644 --- a/extensions/interactions/GraphInput/directives/OppiaShortResponseGraphInputDirective.ts +++ b/extensions/interactions/GraphInput/directives/OppiaShortResponseGraphInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseGraphInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesService.ts b/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesService.ts index f6aafb77ee75..7463e6e1bb1d 100644 --- a/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesService.ts +++ b/extensions/interactions/ImageClickInput/directives/ImageClickInputRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('ImageClickInputRulesService', [function() { return { IsInRegion: function(answer, inputs) { diff --git a/extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts b/extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts index 8183e071e95d..938c1f7dd683 100644 --- a/extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts +++ b/extensions/interactions/ImageClickInput/directives/ImageClickInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ImageClickInputValidationService', [ '$filter', 'baseInteractionValidationService', 'WARNING_TYPES', function($filter, baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/ImageClickInput/directives/OppiaInteractiveImageClickInputDirective.ts b/extensions/interactions/ImageClickInput/directives/OppiaInteractiveImageClickInputDirective.ts index 7b7472eb7494..c227f4fa4285 100644 --- a/extensions/interactions/ImageClickInput/directives/OppiaInteractiveImageClickInputDirective.ts +++ b/extensions/interactions/ImageClickInput/directives/OppiaInteractiveImageClickInputDirective.ts @@ -27,6 +27,8 @@ require('services/AssetsBackendApiService.ts'); require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveImageClickInput', [ '$sce', 'AssetsBackendApiService', 'ContextService', 'HtmlEscaperService', 'ImageClickInputRulesService', 'ImagePreloaderService', diff --git a/extensions/interactions/ImageClickInput/directives/OppiaResponseImageClickInputDirective.ts b/extensions/interactions/ImageClickInput/directives/OppiaResponseImageClickInputDirective.ts index 07063e5f59d7..aadc204964bb 100644 --- a/extensions/interactions/ImageClickInput/directives/OppiaResponseImageClickInputDirective.ts +++ b/extensions/interactions/ImageClickInput/directives/OppiaResponseImageClickInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseImageClickInput', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/ImageClickInput/directives/OppiaShortResponseImageClickInputDirective.ts b/extensions/interactions/ImageClickInput/directives/OppiaShortResponseImageClickInputDirective.ts index 2572f9c87247..22ee17dc1caf 100644 --- a/extensions/interactions/ImageClickInput/directives/OppiaShortResponseImageClickInputDirective.ts +++ b/extensions/interactions/ImageClickInput/directives/OppiaShortResponseImageClickInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseImageClickInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/InteractiveMap/directives/InteractiveMapRulesService.ts b/extensions/interactions/InteractiveMap/directives/InteractiveMapRulesService.ts index d6f5674f25b0..ae49bdedbefe 100644 --- a/extensions/interactions/InteractiveMap/directives/InteractiveMapRulesService.ts +++ b/extensions/interactions/InteractiveMap/directives/InteractiveMapRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('InteractiveMapRulesService', [ function() { var RADIUS_OF_EARTH_KM = 6371.0; diff --git a/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationService.ts b/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationService.ts index 5883dfdd98b6..36b47df623c8 100644 --- a/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationService.ts +++ b/extensions/interactions/InteractiveMap/directives/InteractiveMapValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('InteractiveMapValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/InteractiveMap/directives/OppiaInteractiveInteractiveMapDirective.ts b/extensions/interactions/InteractiveMap/directives/OppiaInteractiveInteractiveMapDirective.ts index dc07fe5a65a3..cf399d01db91 100644 --- a/extensions/interactions/InteractiveMap/directives/OppiaInteractiveInteractiveMapDirective.ts +++ b/extensions/interactions/InteractiveMap/directives/OppiaInteractiveInteractiveMapDirective.ts @@ -27,6 +27,8 @@ require( 'pages/exploration-player-page/services/current-interaction.service.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveInteractiveMap', [ 'HtmlEscaperService', 'InteractiveMapRulesService', 'UrlInterpolationService', 'EVENT_NEW_CARD_AVAILABLE', diff --git a/extensions/interactions/InteractiveMap/directives/OppiaResponseInteractiveMapDirective.ts b/extensions/interactions/InteractiveMap/directives/OppiaResponseInteractiveMapDirective.ts index 837d1d573de9..908ac6105db6 100644 --- a/extensions/interactions/InteractiveMap/directives/OppiaResponseInteractiveMapDirective.ts +++ b/extensions/interactions/InteractiveMap/directives/OppiaResponseInteractiveMapDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseInteractiveMap', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/InteractiveMap/directives/OppiaShortResponseInteractiveMapDirective.ts b/extensions/interactions/InteractiveMap/directives/OppiaShortResponseInteractiveMapDirective.ts index cc7fb7c9b6c9..c2d3c19cfb41 100644 --- a/extensions/interactions/InteractiveMap/directives/OppiaShortResponseInteractiveMapDirective.ts +++ b/extensions/interactions/InteractiveMap/directives/OppiaShortResponseInteractiveMapDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseInteractiveMap', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputRulesService.ts b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputRulesService.ts index ced46d8e0f16..dbac9a2ff1f7 100644 --- a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputRulesService.ts +++ b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputRulesService.ts @@ -18,6 +18,8 @@ require('filters/remove-duplicates-in-array.filter.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ItemSelectionInputRulesService', ['$filter', function($filter) { return { Equals: function(answer, inputs) { diff --git a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationService.ts b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationService.ts index 3c68172922dd..06b7d65c1e38 100644 --- a/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationService.ts +++ b/extensions/interactions/ItemSelectionInput/directives/ItemSelectionInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('ItemSelectionInputValidationService', [ '$filter', 'baseInteractionValidationService', 'WARNING_TYPES', function($filter, baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/ItemSelectionInput/directives/OppiaInteractiveItemSelectionInputDirective.ts b/extensions/interactions/ItemSelectionInput/directives/OppiaInteractiveItemSelectionInputDirective.ts index 652fab8c54ed..2e2a1bf24e1a 100644 --- a/extensions/interactions/ItemSelectionInput/directives/OppiaInteractiveItemSelectionInputDirective.ts +++ b/extensions/interactions/ItemSelectionInput/directives/OppiaInteractiveItemSelectionInputDirective.ts @@ -30,6 +30,8 @@ require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveItemSelectionInput', [ 'HtmlEscaperService', 'ItemSelectionInputRulesService', 'UrlInterpolationService', function( diff --git a/extensions/interactions/ItemSelectionInput/directives/OppiaResponseItemSelectionInputDirective.ts b/extensions/interactions/ItemSelectionInput/directives/OppiaResponseItemSelectionInputDirective.ts index f5dca27f645f..8b41107cb9fc 100644 --- a/extensions/interactions/ItemSelectionInput/directives/OppiaResponseItemSelectionInputDirective.ts +++ b/extensions/interactions/ItemSelectionInput/directives/OppiaResponseItemSelectionInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseItemSelectionInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/ItemSelectionInput/directives/OppiaShortResponseItemSelectionInputDirective.ts b/extensions/interactions/ItemSelectionInput/directives/OppiaShortResponseItemSelectionInputDirective.ts index 0a7f69c4554e..fbec52ec4dac 100644 --- a/extensions/interactions/ItemSelectionInput/directives/OppiaShortResponseItemSelectionInputDirective.ts +++ b/extensions/interactions/ItemSelectionInput/directives/OppiaShortResponseItemSelectionInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseItemSelectionInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/LogicProof/directives/LogicProofRulesService.ts b/extensions/interactions/LogicProof/directives/LogicProofRulesService.ts index 59804ae45d5f..8d1c2d514f47 100644 --- a/extensions/interactions/LogicProof/directives/LogicProofRulesService.ts +++ b/extensions/interactions/LogicProof/directives/LogicProofRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('LogicProofRulesService', [function() { return { Correct: function(answer) { diff --git a/extensions/interactions/LogicProof/directives/LogicProofValidationService.ts b/extensions/interactions/LogicProof/directives/LogicProofValidationService.ts index c232ed3fde52..799a4323d6da 100644 --- a/extensions/interactions/LogicProof/directives/LogicProofValidationService.ts +++ b/extensions/interactions/LogicProof/directives/LogicProofValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('LogicProofValidationService', [ 'baseInteractionValidationService', function(baseInteractionValidationService) { diff --git a/extensions/interactions/LogicProof/directives/OppiaInteractiveLogicProofDirective.ts b/extensions/interactions/LogicProof/directives/OppiaInteractiveLogicProofDirective.ts index 1050f7bdcc6c..1d6fbf1f82a7 100644 --- a/extensions/interactions/LogicProof/directives/OppiaInteractiveLogicProofDirective.ts +++ b/extensions/interactions/LogicProof/directives/OppiaInteractiveLogicProofDirective.ts @@ -24,6 +24,8 @@ require('services/contextual/UrlService.ts'); require('services/contextual/WindowDimensionsService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveLogicProof', [ 'HtmlEscaperService', 'UrlInterpolationService', 'EVENT_NEW_CARD_AVAILABLE', function( diff --git a/extensions/interactions/LogicProof/directives/OppiaResponseLogicProofDirective.ts b/extensions/interactions/LogicProof/directives/OppiaResponseLogicProofDirective.ts index 330ec38802ba..4d071f53b1be 100644 --- a/extensions/interactions/LogicProof/directives/OppiaResponseLogicProofDirective.ts +++ b/extensions/interactions/LogicProof/directives/OppiaResponseLogicProofDirective.ts @@ -19,6 +19,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseLogicProof', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/LogicProof/directives/OppiaShortResponseLogicProofDirective.ts b/extensions/interactions/LogicProof/directives/OppiaShortResponseLogicProofDirective.ts index 067504aafa98..804317d5660b 100644 --- a/extensions/interactions/LogicProof/directives/OppiaShortResponseLogicProofDirective.ts +++ b/extensions/interactions/LogicProof/directives/OppiaShortResponseLogicProofDirective.ts @@ -21,6 +21,8 @@ require('filters/string-utility-filters/truncate-at-first-line.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseLogicProof', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesService.ts b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesService.ts index 6629bc235b1b..7d2185f3fa73 100644 --- a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesService.ts +++ b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('MathExpressionInputRulesService', [function() { return { IsMathematicallyEquivalentTo: function(answer, inputs) { diff --git a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts index 18b8bec5dbe9..026753a0a489 100644 --- a/extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts +++ b/extensions/interactions/MathExpressionInput/directives/MathExpressionInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('MathExpressionInputValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/MathExpressionInput/directives/OppiaInteractiveMathExpressionInputDirective.ts b/extensions/interactions/MathExpressionInput/directives/OppiaInteractiveMathExpressionInputDirective.ts index 0dc6f7872792..c448d14bd09e 100644 --- a/extensions/interactions/MathExpressionInput/directives/OppiaInteractiveMathExpressionInputDirective.ts +++ b/extensions/interactions/MathExpressionInput/directives/OppiaInteractiveMathExpressionInputDirective.ts @@ -31,6 +31,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('services/DebouncerService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveMathExpressionInput', [ 'HtmlEscaperService', 'MathExpressionInputRulesService', 'UrlInterpolationService', diff --git a/extensions/interactions/MathExpressionInput/directives/OppiaResponseMathExpressionInputDirective.ts b/extensions/interactions/MathExpressionInput/directives/OppiaResponseMathExpressionInputDirective.ts index 1d6fd1bff84b..2431f8859bd7 100644 --- a/extensions/interactions/MathExpressionInput/directives/OppiaResponseMathExpressionInputDirective.ts +++ b/extensions/interactions/MathExpressionInput/directives/OppiaResponseMathExpressionInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseMathExpressionInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MathExpressionInput/directives/OppiaShortResponseMathExpressionInputDirective.ts b/extensions/interactions/MathExpressionInput/directives/OppiaShortResponseMathExpressionInputDirective.ts index 5da821386442..98c056c3348e 100644 --- a/extensions/interactions/MathExpressionInput/directives/OppiaShortResponseMathExpressionInputDirective.ts +++ b/extensions/interactions/MathExpressionInput/directives/OppiaShortResponseMathExpressionInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseMathExpressionInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputRulesService.ts b/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputRulesService.ts index c2bb6cbae075..23dc1ecf539e 100644 --- a/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputRulesService.ts +++ b/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('MultipleChoiceInputRulesService', [function() { return { Equals: function(answer, inputs) { diff --git a/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts b/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts index ec5f4023d636..8b2f337e1524 100644 --- a/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts +++ b/extensions/interactions/MultipleChoiceInput/directives/MultipleChoiceInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('MultipleChoiceInputValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/MultipleChoiceInput/directives/OppiaInteractiveMultipleChoiceInputDirective.ts b/extensions/interactions/MultipleChoiceInput/directives/OppiaInteractiveMultipleChoiceInputDirective.ts index 1e4330421685..9279d3aead45 100644 --- a/extensions/interactions/MultipleChoiceInput/directives/OppiaInteractiveMultipleChoiceInputDirective.ts +++ b/extensions/interactions/MultipleChoiceInput/directives/OppiaInteractiveMultipleChoiceInputDirective.ts @@ -28,6 +28,8 @@ require( 'MultipleChoiceInputRulesService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveMultipleChoiceInput', [ 'HtmlEscaperService', 'MultipleChoiceInputRulesService', 'UrlInterpolationService', diff --git a/extensions/interactions/MultipleChoiceInput/directives/OppiaResponseMultipleChoiceInputDirective.ts b/extensions/interactions/MultipleChoiceInput/directives/OppiaResponseMultipleChoiceInputDirective.ts index e00f9e3efa5d..439c33a84a3c 100644 --- a/extensions/interactions/MultipleChoiceInput/directives/OppiaResponseMultipleChoiceInputDirective.ts +++ b/extensions/interactions/MultipleChoiceInput/directives/OppiaResponseMultipleChoiceInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseMultipleChoiceInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MultipleChoiceInput/directives/OppiaShortResponseMultipleChoiceInputDirective.ts b/extensions/interactions/MultipleChoiceInput/directives/OppiaShortResponseMultipleChoiceInputDirective.ts index eeefc532fbd8..56ce0aa01471 100644 --- a/extensions/interactions/MultipleChoiceInput/directives/OppiaShortResponseMultipleChoiceInputDirective.ts +++ b/extensions/interactions/MultipleChoiceInput/directives/OppiaShortResponseMultipleChoiceInputDirective.ts @@ -25,6 +25,8 @@ require('filters/string-utility-filters/convert-to-plain-text.filter.ts'); require('filters/string-utility-filters/truncate-at-first-line.filter.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseMultipleChoiceInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputRulesService.ts b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputRulesService.ts index c117cb1be0c1..74912e947dda 100644 --- a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputRulesService.ts +++ b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputRulesService.ts @@ -23,6 +23,8 @@ require( require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('MusicNotesInputRulesService', [ 'NOTE_NAMES_TO_MIDI_VALUES', function(NOTE_NAMES_TO_MIDI_VALUES) { var _getMidiNoteValue = function(note) { diff --git a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts index 3ea0b507a8f5..0fdda3dd2b81 100644 --- a/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts +++ b/extensions/interactions/MusicNotesInput/directives/MusicNotesInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('MusicNotesInputValidationService', [ 'baseInteractionValidationService', function(baseInteractionValidationService) { diff --git a/extensions/interactions/MusicNotesInput/directives/MusicPhrasePlayerService.ts b/extensions/interactions/MusicNotesInput/directives/MusicPhrasePlayerService.ts index ce0499d3e078..98c750f5eb7a 100644 --- a/extensions/interactions/MusicNotesInput/directives/MusicPhrasePlayerService.ts +++ b/extensions/interactions/MusicNotesInput/directives/MusicPhrasePlayerService.ts @@ -16,6 +16,8 @@ * @fileoverview Player service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('MusicPhrasePlayerService', ['$timeout', function($timeout) { var _MIDI_CHANNEL = 0; var _MIDI_VELOCITY = 127; diff --git a/extensions/interactions/MusicNotesInput/directives/OppiaInteractiveMusicNotesInputDirective.ts b/extensions/interactions/MusicNotesInput/directives/OppiaInteractiveMusicNotesInputDirective.ts index 9dbdf452ad3e..aa7422c8bbe3 100644 --- a/extensions/interactions/MusicNotesInput/directives/OppiaInteractiveMusicNotesInputDirective.ts +++ b/extensions/interactions/MusicNotesInput/directives/OppiaInteractiveMusicNotesInputDirective.ts @@ -33,6 +33,8 @@ require('services/HtmlEscaperService.ts'); require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveMusicNotesInput', [ 'CurrentInteractionService', 'HtmlEscaperService', 'MusicNotesInputRulesService', 'MusicPhrasePlayerService', diff --git a/extensions/interactions/MusicNotesInput/directives/OppiaResponseMusicNotesInputDirective.ts b/extensions/interactions/MusicNotesInput/directives/OppiaResponseMusicNotesInputDirective.ts index 6810474ec8cb..103b11291bc5 100644 --- a/extensions/interactions/MusicNotesInput/directives/OppiaResponseMusicNotesInputDirective.ts +++ b/extensions/interactions/MusicNotesInput/directives/OppiaResponseMusicNotesInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseMusicNotesInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/MusicNotesInput/directives/OppiaShortResponseMusicNotesInputDirective.ts b/extensions/interactions/MusicNotesInput/directives/OppiaShortResponseMusicNotesInputDirective.ts index 66f26f6e652e..5e85d5c916d7 100644 --- a/extensions/interactions/MusicNotesInput/directives/OppiaShortResponseMusicNotesInputDirective.ts +++ b/extensions/interactions/MusicNotesInput/directives/OppiaShortResponseMusicNotesInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseMusicNotesInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsRulesService.ts b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsRulesService.ts index 0fbaaaa06810..1878423c44ae 100644 --- a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsRulesService.ts +++ b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsRulesService.ts @@ -20,6 +20,8 @@ require('domain/objects/FractionObjectFactory.ts'); require('domain/objects/NumberWithUnitsObjectFactory.ts'); // Rules service for number with units interaction. +var oppia = require('AppInit.ts').module; + oppia.factory('NumberWithUnitsRulesService', [ 'FractionObjectFactory', 'NumberWithUnitsObjectFactory', function(FractionObjectFactory, NumberWithUnitsObjectFactory) { diff --git a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationService.ts b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationService.ts index 93ba780f088a..0b4c1926ad25 100644 --- a/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationService.ts +++ b/extensions/interactions/NumberWithUnits/directives/NumberWithUnitsValidationService.ts @@ -19,6 +19,8 @@ require('domain/objects/NumberWithUnitsObjectFactory.ts'); require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('NumberWithUnitsValidationService', [ 'NumberWithUnitsObjectFactory', 'baseInteractionValidationService', 'WARNING_TYPES', diff --git a/extensions/interactions/NumberWithUnits/directives/OppiaInteractiveNumberWithUnitsDirective.ts b/extensions/interactions/NumberWithUnits/directives/OppiaInteractiveNumberWithUnitsDirective.ts index ab1d91c74ce5..f0818b542873 100644 --- a/extensions/interactions/NumberWithUnits/directives/OppiaInteractiveNumberWithUnitsDirective.ts +++ b/extensions/interactions/NumberWithUnits/directives/OppiaInteractiveNumberWithUnitsDirective.ts @@ -24,6 +24,8 @@ require( 'interactions/NumberWithUnits/directives/NumberWithUnitsRulesService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveNumberWithUnits', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/NumberWithUnits/directives/OppiaResponseNumberWithUnitsDirective.ts b/extensions/interactions/NumberWithUnits/directives/OppiaResponseNumberWithUnitsDirective.ts index 6142215bde43..9a163e982e98 100644 --- a/extensions/interactions/NumberWithUnits/directives/OppiaResponseNumberWithUnitsDirective.ts +++ b/extensions/interactions/NumberWithUnits/directives/OppiaResponseNumberWithUnitsDirective.ts @@ -20,6 +20,8 @@ require('domain/objects/NumberWithUnitsObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseNumberWithUnits', [ 'HtmlEscaperService', 'NumberWithUnitsObjectFactory', 'UrlInterpolationService', function(HtmlEscaperService, diff --git a/extensions/interactions/NumberWithUnits/directives/OppiaShortResponseNumberWithUnitsDirective.ts b/extensions/interactions/NumberWithUnits/directives/OppiaShortResponseNumberWithUnitsDirective.ts index 7b2d29914c07..6bb7f96b6553 100644 --- a/extensions/interactions/NumberWithUnits/directives/OppiaShortResponseNumberWithUnitsDirective.ts +++ b/extensions/interactions/NumberWithUnits/directives/OppiaShortResponseNumberWithUnitsDirective.ts @@ -20,6 +20,8 @@ require('domain/objects/NumberWithUnitsObjectFactory.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseNumberWithUnits', [ 'HtmlEscaperService', 'NumberWithUnitsObjectFactory', 'UrlInterpolationService', function(HtmlEscaperService, diff --git a/extensions/interactions/NumericInput/directives/NumericInputRulesService.ts b/extensions/interactions/NumericInput/directives/NumericInputRulesService.ts index 9f3b7ed21164..0a2ce1e94233 100644 --- a/extensions/interactions/NumericInput/directives/NumericInputRulesService.ts +++ b/extensions/interactions/NumericInput/directives/NumericInputRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('NumericInputRulesService', [function() { return { Equals: function(answer, inputs) { diff --git a/extensions/interactions/NumericInput/directives/NumericInputValidationService.ts b/extensions/interactions/NumericInput/directives/NumericInputValidationService.ts index 8817f86bed11..7ada1d31b0d3 100644 --- a/extensions/interactions/NumericInput/directives/NumericInputValidationService.ts +++ b/extensions/interactions/NumericInput/directives/NumericInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('NumericInputValidationService', [ 'baseInteractionValidationService', 'WARNING_TYPES', function(baseInteractionValidationService, WARNING_TYPES) { diff --git a/extensions/interactions/NumericInput/directives/OppiaInteractiveNumericInputDirective.ts b/extensions/interactions/NumericInput/directives/OppiaInteractiveNumericInputDirective.ts index d325eb3f8503..f24183355b5e 100644 --- a/extensions/interactions/NumericInput/directives/OppiaInteractiveNumericInputDirective.ts +++ b/extensions/interactions/NumericInput/directives/OppiaInteractiveNumericInputDirective.ts @@ -27,6 +27,8 @@ require( require('services/contextual/WindowDimensionsService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveNumericInput', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/NumericInput/directives/OppiaResponseNumericInputDirective.ts b/extensions/interactions/NumericInput/directives/OppiaResponseNumericInputDirective.ts index 66e216d22174..062a2a0a9846 100644 --- a/extensions/interactions/NumericInput/directives/OppiaResponseNumericInputDirective.ts +++ b/extensions/interactions/NumericInput/directives/OppiaResponseNumericInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseNumericInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/NumericInput/directives/OppiaShortResponseNumericInputDirective.ts b/extensions/interactions/NumericInput/directives/OppiaShortResponseNumericInputDirective.ts index 7afb3718ae51..3baf62ca82d1 100644 --- a/extensions/interactions/NumericInput/directives/OppiaShortResponseNumericInputDirective.ts +++ b/extensions/interactions/NumericInput/directives/OppiaShortResponseNumericInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseNumericInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/PencilCodeEditor/directives/OppiaInteractivePencilCodeEditorDirective.ts b/extensions/interactions/PencilCodeEditor/directives/OppiaInteractivePencilCodeEditorDirective.ts index 2448183ccfa8..57f615935f12 100644 --- a/extensions/interactions/PencilCodeEditor/directives/OppiaInteractivePencilCodeEditorDirective.ts +++ b/extensions/interactions/PencilCodeEditor/directives/OppiaInteractivePencilCodeEditorDirective.ts @@ -29,6 +29,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('services/HtmlEscaperService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractivePencilCodeEditor', [ 'HtmlEscaperService', 'UrlInterpolationService', 'EVENT_NEW_CARD_AVAILABLE', function( diff --git a/extensions/interactions/PencilCodeEditor/directives/OppiaResponsePencilCodeEditorDirective.ts b/extensions/interactions/PencilCodeEditor/directives/OppiaResponsePencilCodeEditorDirective.ts index 41cbc99ba646..13fa15d5e186 100644 --- a/extensions/interactions/PencilCodeEditor/directives/OppiaResponsePencilCodeEditorDirective.ts +++ b/extensions/interactions/PencilCodeEditor/directives/OppiaResponsePencilCodeEditorDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponsePencilCodeEditor', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/PencilCodeEditor/directives/OppiaShortResponsePencilCodeEditorDirective.ts b/extensions/interactions/PencilCodeEditor/directives/OppiaShortResponsePencilCodeEditorDirective.ts index 19fad69ee80c..14b5ca7fb7c3 100644 --- a/extensions/interactions/PencilCodeEditor/directives/OppiaShortResponsePencilCodeEditorDirective.ts +++ b/extensions/interactions/PencilCodeEditor/directives/OppiaShortResponsePencilCodeEditorDirective.ts @@ -25,6 +25,8 @@ require('filters/string-utility-filters/truncate-at-first-line.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponsePencilCodeEditor', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesService.ts b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesService.ts index 1f78e1fb9bc1..d8bc4bd65933 100644 --- a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesService.ts +++ b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorRulesService.ts @@ -22,6 +22,8 @@ require( 'normalize-whitespace-punctuation-and-case.filter.ts'); require('services/CodeNormalizerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PencilCodeEditorRulesService', [ '$filter', 'CodeNormalizerService', function($filter, CodeNormalizerService) { diff --git a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts index 78786322f3a1..9ce98290011c 100644 --- a/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts +++ b/extensions/interactions/PencilCodeEditor/directives/PencilCodeEditorValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('PencilCodeEditorValidationService', [ 'baseInteractionValidationService', function(baseInteractionValidationService) { diff --git a/extensions/interactions/SetInput/directives/OppiaInteractiveSetInputDirective.ts b/extensions/interactions/SetInput/directives/OppiaInteractiveSetInputDirective.ts index 858c3c26e895..ba106700ec2a 100644 --- a/extensions/interactions/SetInput/directives/OppiaInteractiveSetInputDirective.ts +++ b/extensions/interactions/SetInput/directives/OppiaInteractiveSetInputDirective.ts @@ -26,6 +26,8 @@ require( 'pages/exploration-player-page/services/current-interaction.service.ts'); require('services/contextual/WindowDimensionsService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveSetInput', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/interactions/SetInput/directives/OppiaResponseSetInputDirective.ts b/extensions/interactions/SetInput/directives/OppiaResponseSetInputDirective.ts index 1d0ee85ccef4..4b8805ec7660 100644 --- a/extensions/interactions/SetInput/directives/OppiaResponseSetInputDirective.ts +++ b/extensions/interactions/SetInput/directives/OppiaResponseSetInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseSetInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/SetInput/directives/OppiaShortResponseSetInputDirective.ts b/extensions/interactions/SetInput/directives/OppiaShortResponseSetInputDirective.ts index d504f2123b85..2930ccdb1f80 100644 --- a/extensions/interactions/SetInput/directives/OppiaShortResponseSetInputDirective.ts +++ b/extensions/interactions/SetInput/directives/OppiaShortResponseSetInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseSetInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/SetInput/directives/SetInputRulesService.ts b/extensions/interactions/SetInput/directives/SetInputRulesService.ts index 867f4bc53170..76e510b7529f 100644 --- a/extensions/interactions/SetInput/directives/SetInputRulesService.ts +++ b/extensions/interactions/SetInput/directives/SetInputRulesService.ts @@ -16,6 +16,8 @@ * @fileoverview Rules service for the interaction. */ +var oppia = require('AppInit.ts').module; + oppia.factory('SetInputRulesService', [function() { return { Equals: function(answer, inputs) { diff --git a/extensions/interactions/SetInput/directives/SetInputValidationService.ts b/extensions/interactions/SetInput/directives/SetInputValidationService.ts index c9eb4e22a379..9b7fe59786f9 100644 --- a/extensions/interactions/SetInput/directives/SetInputValidationService.ts +++ b/extensions/interactions/SetInput/directives/SetInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('SetInputValidationService', [ 'baseInteractionValidationService', function(baseInteractionValidationService) { diff --git a/extensions/interactions/TextInput/TextInputPredictionService.ts b/extensions/interactions/TextInput/TextInputPredictionService.ts index 20d9d94d0f8a..7a37efef9ae2 100644 --- a/extensions/interactions/TextInput/TextInputPredictionService.ts +++ b/extensions/interactions/TextInput/TextInputPredictionService.ts @@ -27,6 +27,8 @@ require('classifiers/CountVectorizerService.ts'); require('interactions/interactions-extension.constants.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TextInputPredictionService', [ 'CountVectorizerService', 'SVMPredictionService', 'TextInputTokenizer', 'TEXT_INPUT_PREDICTION_SERVICE_THRESHOLD', function( diff --git a/extensions/interactions/TextInput/directives/OppiaInteractiveTextInputDirective.ts b/extensions/interactions/TextInput/directives/OppiaInteractiveTextInputDirective.ts index dce5607ff7e0..e86ac38178ab 100644 --- a/extensions/interactions/TextInput/directives/OppiaInteractiveTextInputDirective.ts +++ b/extensions/interactions/TextInput/directives/OppiaInteractiveTextInputDirective.ts @@ -28,6 +28,8 @@ require('services/contextual/WindowDimensionsService.ts'); require('services/HtmlEscaperService.ts'); require('services/stateful/FocusManagerService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaInteractiveTextInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/TextInput/directives/OppiaResponseTextInputDirective.ts b/extensions/interactions/TextInput/directives/OppiaResponseTextInputDirective.ts index 6de0314fbbe1..2974495d376a 100644 --- a/extensions/interactions/TextInput/directives/OppiaResponseTextInputDirective.ts +++ b/extensions/interactions/TextInput/directives/OppiaResponseTextInputDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaResponseTextInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/TextInput/directives/OppiaShortResponseTextInputDirective.ts b/extensions/interactions/TextInput/directives/OppiaShortResponseTextInputDirective.ts index b3f730b9e93b..54b69603ac15 100644 --- a/extensions/interactions/TextInput/directives/OppiaShortResponseTextInputDirective.ts +++ b/extensions/interactions/TextInput/directives/OppiaShortResponseTextInputDirective.ts @@ -25,6 +25,8 @@ require('filters/string-utility-filters/truncate-at-first-line.filter.ts'); require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaShortResponseTextInput', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/interactions/TextInput/directives/TextInputRulesService.ts b/extensions/interactions/TextInput/directives/TextInputRulesService.ts index b0871549005f..6f49e867b653 100644 --- a/extensions/interactions/TextInput/directives/TextInputRulesService.ts +++ b/extensions/interactions/TextInput/directives/TextInputRulesService.ts @@ -18,6 +18,8 @@ require('filters/string-utility-filters/normalize-whitespace.filter.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TextInputRulesService', ['$filter', function($filter) { return { Equals: function(answer, inputs) { diff --git a/extensions/interactions/TextInput/directives/TextInputValidationService.ts b/extensions/interactions/TextInput/directives/TextInputValidationService.ts index ba49a42cf95d..0a06e18167d9 100644 --- a/extensions/interactions/TextInput/directives/TextInputValidationService.ts +++ b/extensions/interactions/TextInput/directives/TextInputValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('TextInputValidationService', [ 'baseInteractionValidationService', 'INTERACTION_SPECS', 'WARNING_TYPES', function(baseInteractionValidationService, INTERACTION_SPECS, WARNING_TYPES) { diff --git a/extensions/interactions/baseInteractionValidationService.ts b/extensions/interactions/baseInteractionValidationService.ts index 7c829eab629d..4ec2cbfe5421 100644 --- a/extensions/interactions/baseInteractionValidationService.ts +++ b/extensions/interactions/baseInteractionValidationService.ts @@ -18,6 +18,8 @@ require('interactions/baseInteractionValidationService.ts'); +var oppia = require('AppInit.ts').module; + oppia.factory('baseInteractionValidationService', [ '$filter', 'WARNING_TYPES', function($filter, WARNING_TYPES) { return { diff --git a/extensions/interactions/interactions-extension.constants.ts b/extensions/interactions/interactions-extension.constants.ts index 017c45e6f40a..33114d908f62 100644 --- a/extensions/interactions/interactions-extension.constants.ts +++ b/extensions/interactions/interactions-extension.constants.ts @@ -16,6 +16,8 @@ * @fileoverview Constants for interactions extensions. */ +var oppia = require('AppInit.ts').module; + // Minimum confidence required for a predicted answer group to be shown to user. // Generally a threshold of 0.7-0.8 is assumed to be a good one in practice, // however value need not be in those bounds. diff --git a/extensions/objects/templates/BooleanEditorDirective.ts b/extensions/objects/templates/BooleanEditorDirective.ts index 2f9c36b604f0..b92993d04b4f 100644 --- a/extensions/objects/templates/BooleanEditorDirective.ts +++ b/extensions/objects/templates/BooleanEditorDirective.ts @@ -18,6 +18,8 @@ // The value for this editor is always editable. +var oppia = require('AppInit.ts').module; + oppia.directive('booleanEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/CodeStringEditorDirective.ts b/extensions/objects/templates/CodeStringEditorDirective.ts index 04f96f66b491..673ebca58a56 100644 --- a/extensions/objects/templates/CodeStringEditorDirective.ts +++ b/extensions/objects/templates/CodeStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('codeStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/CoordTwoDimEditorDirective.ts b/extensions/objects/templates/CoordTwoDimEditorDirective.ts index 4c9d1e0eb6d3..e448d0bca97e 100644 --- a/extensions/objects/templates/CoordTwoDimEditorDirective.ts +++ b/extensions/objects/templates/CoordTwoDimEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for coord two dim editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('coordTwoDimEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/DragAndDropHtmlStringEditorDirective.ts b/extensions/objects/templates/DragAndDropHtmlStringEditorDirective.ts index 22e7463ecbb0..1fe9e8bb4187 100644 --- a/extensions/objects/templates/DragAndDropHtmlStringEditorDirective.ts +++ b/extensions/objects/templates/DragAndDropHtmlStringEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for drag and drop HTML string editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('dragAndDropHtmlStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/DragAndDropPositiveIntEditorDirective.ts b/extensions/objects/templates/DragAndDropPositiveIntEditorDirective.ts index 8c3add3ac41f..afa120388a70 100644 --- a/extensions/objects/templates/DragAndDropPositiveIntEditorDirective.ts +++ b/extensions/objects/templates/DragAndDropPositiveIntEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for drag and drop positive int editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('dragAndDropPositiveIntEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/FilepathEditorDirective.ts b/extensions/objects/templates/FilepathEditorDirective.ts index d5abdf16ab2c..e5d83920d299 100644 --- a/extensions/objects/templates/FilepathEditorDirective.ts +++ b/extensions/objects/templates/FilepathEditorDirective.ts @@ -18,6 +18,8 @@ // This directive can only be used in the context of an exploration. +var oppia = require('AppInit.ts').module; + oppia.directive('filepathEditor', [ '$http', '$sce', 'AlertsService', 'AssetsBackendApiService', 'ContextService', 'UrlInterpolationService', diff --git a/extensions/objects/templates/FractionEditorDirective.ts b/extensions/objects/templates/FractionEditorDirective.ts index e7949d958729..3aa31352c3b3 100644 --- a/extensions/objects/templates/FractionEditorDirective.ts +++ b/extensions/objects/templates/FractionEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for fraction editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('fractionEditor', [ 'FractionObjectFactory', 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', diff --git a/extensions/objects/templates/GraphEditorDirective.ts b/extensions/objects/templates/GraphEditorDirective.ts index 7b45ee7955a6..c90c6d4e426b 100644 --- a/extensions/objects/templates/GraphEditorDirective.ts +++ b/extensions/objects/templates/GraphEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('graphEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/GraphPropertyEditorDirective.ts b/extensions/objects/templates/GraphPropertyEditorDirective.ts index ecefa49b8259..f11e98c4cca0 100644 --- a/extensions/objects/templates/GraphPropertyEditorDirective.ts +++ b/extensions/objects/templates/GraphPropertyEditorDirective.ts @@ -21,6 +21,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('graphPropertyEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/HtmlEditorDirective.ts b/extensions/objects/templates/HtmlEditorDirective.ts index e6aba78700ba..2bfc0f5f8ce2 100644 --- a/extensions/objects/templates/HtmlEditorDirective.ts +++ b/extensions/objects/templates/HtmlEditorDirective.ts @@ -22,6 +22,8 @@ // // This directive is based on the UnicodeString directive. +var oppia = require('AppInit.ts').module; + oppia.directive('htmlEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/ImageWithRegionsEditorDirective.ts b/extensions/objects/templates/ImageWithRegionsEditorDirective.ts index cb35ae04fa95..2d7fab63ad6d 100644 --- a/extensions/objects/templates/ImageWithRegionsEditorDirective.ts +++ b/extensions/objects/templates/ImageWithRegionsEditorDirective.ts @@ -21,6 +21,8 @@ // in via initArgs. // TODO(czx): Uniquify the labels of image regions +var oppia = require('AppInit.ts').module; + oppia.directive('imageWithRegionsEditor', [ '$document', '$sce', 'AlertsService', 'AssetsBackendApiService', 'ContextService', 'UrlInterpolationService', diff --git a/extensions/objects/templates/IntEditorDirective.ts b/extensions/objects/templates/IntEditorDirective.ts index 36f375a3e1ef..d5c388344a09 100644 --- a/extensions/objects/templates/IntEditorDirective.ts +++ b/extensions/objects/templates/IntEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('intEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/ListOfSetsOfHtmlStringsEditorDirective.ts b/extensions/objects/templates/ListOfSetsOfHtmlStringsEditorDirective.ts index fe2efcfaf101..7112f4c6e24f 100644 --- a/extensions/objects/templates/ListOfSetsOfHtmlStringsEditorDirective.ts +++ b/extensions/objects/templates/ListOfSetsOfHtmlStringsEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for list of sets of html strings editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('listOfSetsOfHtmlStringsEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/ListOfTabsEditorDirective.ts b/extensions/objects/templates/ListOfTabsEditorDirective.ts index e8284506458e..be15bde7cdbe 100644 --- a/extensions/objects/templates/ListOfTabsEditorDirective.ts +++ b/extensions/objects/templates/ListOfTabsEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('listOfTabsEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/ListOfUnicodeStringEditorDirective.ts b/extensions/objects/templates/ListOfUnicodeStringEditorDirective.ts index b2891c35a8b2..f00779281fba 100644 --- a/extensions/objects/templates/ListOfUnicodeStringEditorDirective.ts +++ b/extensions/objects/templates/ListOfUnicodeStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('listOfUnicodeStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/LogicErrorCategoryEditorDirective.ts b/extensions/objects/templates/LogicErrorCategoryEditorDirective.ts index de85b4f16677..e011596d60ba 100644 --- a/extensions/objects/templates/LogicErrorCategoryEditorDirective.ts +++ b/extensions/objects/templates/LogicErrorCategoryEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('logicErrorCategoryEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/LogicQuestionEditorDirective.ts b/extensions/objects/templates/LogicQuestionEditorDirective.ts index 4c9b95033c07..17436e7def03 100644 --- a/extensions/objects/templates/LogicQuestionEditorDirective.ts +++ b/extensions/objects/templates/LogicQuestionEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('logicQuestionEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/MathLatexStringEditorDirective.ts b/extensions/objects/templates/MathLatexStringEditorDirective.ts index 43c443bde347..3bb27220dc99 100644 --- a/extensions/objects/templates/MathLatexStringEditorDirective.ts +++ b/extensions/objects/templates/MathLatexStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('mathLatexStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/MusicPhraseEditorDirective.ts b/extensions/objects/templates/MusicPhraseEditorDirective.ts index 8267a3b5b9aa..230b748c01dd 100644 --- a/extensions/objects/templates/MusicPhraseEditorDirective.ts +++ b/extensions/objects/templates/MusicPhraseEditorDirective.ts @@ -18,6 +18,8 @@ // This directive is always editable. +var oppia = require('AppInit.ts').module; + oppia.directive('musicPhraseEditor', [ 'AlertsService', 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(AlertsService, UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/NonnegativeIntEditorDirective.ts b/extensions/objects/templates/NonnegativeIntEditorDirective.ts index 2542b4e78ff3..bcb8e99ad83c 100644 --- a/extensions/objects/templates/NonnegativeIntEditorDirective.ts +++ b/extensions/objects/templates/NonnegativeIntEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('nonnegativeIntEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/NormalizedStringEditorDirective.ts b/extensions/objects/templates/NormalizedStringEditorDirective.ts index a7f9fc93a9a9..1cd5738c28f2 100644 --- a/extensions/objects/templates/NormalizedStringEditorDirective.ts +++ b/extensions/objects/templates/NormalizedStringEditorDirective.ts @@ -18,6 +18,8 @@ // This is a copy of the UnicodeStringEditor. +var oppia = require('AppInit.ts').module; + oppia.directive('normalizedStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/NumberWithUnitsEditorDirective.ts b/extensions/objects/templates/NumberWithUnitsEditorDirective.ts index 5f790022133e..7fb7a30dbf2f 100644 --- a/extensions/objects/templates/NumberWithUnitsEditorDirective.ts +++ b/extensions/objects/templates/NumberWithUnitsEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for number with units editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('numberWithUnitsEditor', [ 'NumberWithUnitsObjectFactory', 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', diff --git a/extensions/objects/templates/ParameterNameEditorDirective.ts b/extensions/objects/templates/ParameterNameEditorDirective.ts index e06dbbe4a2ee..26776c84a560 100644 --- a/extensions/objects/templates/ParameterNameEditorDirective.ts +++ b/extensions/objects/templates/ParameterNameEditorDirective.ts @@ -19,6 +19,8 @@ // NOTE TO DEVELOPERS: This editor requires ExplorationParamSpecsService to be // available in the context in which it is used. +var oppia = require('AppInit.ts').module; + oppia.directive('parameterNameEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/RealEditorDirective.ts b/extensions/objects/templates/RealEditorDirective.ts index 1eb45f7edb0b..0fe5eab9140e 100644 --- a/extensions/objects/templates/RealEditorDirective.ts +++ b/extensions/objects/templates/RealEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for real editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('realEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/SanitizedUrlEditorDirective.ts b/extensions/objects/templates/SanitizedUrlEditorDirective.ts index 5077bfcc88bb..e4bdec6c8248 100644 --- a/extensions/objects/templates/SanitizedUrlEditorDirective.ts +++ b/extensions/objects/templates/SanitizedUrlEditorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for sanitized URL editor. */ +var oppia = require('AppInit.ts').module; + oppia.directive('sanitizedUrlEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/SetOfHtmlStringEditorDirective.ts b/extensions/objects/templates/SetOfHtmlStringEditorDirective.ts index 8d6d38f22ccf..be178d6cde70 100644 --- a/extensions/objects/templates/SetOfHtmlStringEditorDirective.ts +++ b/extensions/objects/templates/SetOfHtmlStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('setOfHtmlStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/SetOfUnicodeStringEditorDirective.ts b/extensions/objects/templates/SetOfUnicodeStringEditorDirective.ts index fcc774c2d20f..8d9b480da3ca 100644 --- a/extensions/objects/templates/SetOfUnicodeStringEditorDirective.ts +++ b/extensions/objects/templates/SetOfUnicodeStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('setOfUnicodeStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/objects/templates/UnicodeStringEditorDirective.ts b/extensions/objects/templates/UnicodeStringEditorDirective.ts index 603fa6a4bd99..0f27b068a9f4 100644 --- a/extensions/objects/templates/UnicodeStringEditorDirective.ts +++ b/extensions/objects/templates/UnicodeStringEditorDirective.ts @@ -20,6 +20,8 @@ // may be additional customization options for the editor that should be passed // in via initArgs. +var oppia = require('AppInit.ts').module; + oppia.directive('unicodeStringEditor', [ 'UrlInterpolationService', 'OBJECT_EDITOR_URL_PREFIX', function(UrlInterpolationService, OBJECT_EDITOR_URL_PREFIX) { diff --git a/extensions/rich_text_components/Collapsible/directives/OppiaNoninteractiveCollapsibleDirective.ts b/extensions/rich_text_components/Collapsible/directives/OppiaNoninteractiveCollapsibleDirective.ts index 404f69f19ef8..c9d20806568f 100644 --- a/extensions/rich_text_components/Collapsible/directives/OppiaNoninteractiveCollapsibleDirective.ts +++ b/extensions/rich_text_components/Collapsible/directives/OppiaNoninteractiveCollapsibleDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveCollapsible', [ '$rootScope', '$sce', 'HtmlEscaperService', 'UrlInterpolationService', function($rootScope, $sce, HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/rich_text_components/Image/directives/OppiaNoninteractiveImageDirective.ts b/extensions/rich_text_components/Image/directives/OppiaNoninteractiveImageDirective.ts index 1ea3dadd3af1..16463d9710d7 100644 --- a/extensions/rich_text_components/Image/directives/OppiaNoninteractiveImageDirective.ts +++ b/extensions/rich_text_components/Image/directives/OppiaNoninteractiveImageDirective.ts @@ -26,6 +26,8 @@ require('services/AssetsBackendApiService.ts'); require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveImage', [ '$rootScope', '$sce', 'AssetsBackendApiService', 'ContextService', 'HtmlEscaperService', 'ImagePreloaderService', diff --git a/extensions/rich_text_components/Link/directives/OppiaNoninteractiveLinkDirective.ts b/extensions/rich_text_components/Link/directives/OppiaNoninteractiveLinkDirective.ts index 231d8564a988..8a291db3420c 100644 --- a/extensions/rich_text_components/Link/directives/OppiaNoninteractiveLinkDirective.ts +++ b/extensions/rich_text_components/Link/directives/OppiaNoninteractiveLinkDirective.ts @@ -24,6 +24,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveLink', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/rich_text_components/Math/directives/OppiaNoninteractiveMathDirective.ts b/extensions/rich_text_components/Math/directives/OppiaNoninteractiveMathDirective.ts index 85c46dda3d3e..b6d0eef5e865 100644 --- a/extensions/rich_text_components/Math/directives/OppiaNoninteractiveMathDirective.ts +++ b/extensions/rich_text_components/Math/directives/OppiaNoninteractiveMathDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveMath', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/rich_text_components/Tabs/directives/OppiaNoninteractiveTabsDirective.ts b/extensions/rich_text_components/Tabs/directives/OppiaNoninteractiveTabsDirective.ts index 23801aa7e708..2498a89e641e 100644 --- a/extensions/rich_text_components/Tabs/directives/OppiaNoninteractiveTabsDirective.ts +++ b/extensions/rich_text_components/Tabs/directives/OppiaNoninteractiveTabsDirective.ts @@ -23,6 +23,8 @@ require('domain/utilities/UrlInterpolationService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveTabs', [ 'HtmlEscaperService', 'UrlInterpolationService', function(HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/rich_text_components/Video/directives/OppiaNoninteractiveVideoDirective.ts b/extensions/rich_text_components/Video/directives/OppiaNoninteractiveVideoDirective.ts index a8a3cc6b107b..041bdb9667e1 100644 --- a/extensions/rich_text_components/Video/directives/OppiaNoninteractiveVideoDirective.ts +++ b/extensions/rich_text_components/Video/directives/OppiaNoninteractiveVideoDirective.ts @@ -25,6 +25,8 @@ require('services/AutoplayedVideosService.ts'); require('services/ContextService.ts'); require('services/HtmlEscaperService.ts'); +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaNoninteractiveVideo', [ '$sce', 'HtmlEscaperService', 'UrlInterpolationService', function($sce, HtmlEscaperService, UrlInterpolationService) { diff --git a/extensions/value_generators/templates/CopierDirective.ts b/extensions/value_generators/templates/CopierDirective.ts index 7eb771e924e5..87c3dc8ff31d 100644 --- a/extensions/value_generators/templates/CopierDirective.ts +++ b/extensions/value_generators/templates/CopierDirective.ts @@ -19,6 +19,8 @@ // TODO(sll): Remove this directive (as well as the whole of the value // generators framework). +var oppia = require('AppInit.ts').module; + oppia.directive('copier', ['$compile', function($compile) { return { link: function(scope: ICustomScope, element) { diff --git a/extensions/value_generators/templates/RandomSelectorDirective.ts b/extensions/value_generators/templates/RandomSelectorDirective.ts index 4b5ceb969428..c6f4de6dc106 100644 --- a/extensions/value_generators/templates/RandomSelectorDirective.ts +++ b/extensions/value_generators/templates/RandomSelectorDirective.ts @@ -16,6 +16,8 @@ * @fileoverview Directive for random selector value generator. */ +var oppia = require('AppInit.ts').module; + oppia.directive('randomSelector', ['$compile', function($compile) { return { link: function(scope: ICustomScope, element) { diff --git a/extensions/visualizations/OppiaVisualizationBarChartDirective.ts b/extensions/visualizations/OppiaVisualizationBarChartDirective.ts index abd6634e1888..1a6fa0f84460 100644 --- a/extensions/visualizations/OppiaVisualizationBarChartDirective.ts +++ b/extensions/visualizations/OppiaVisualizationBarChartDirective.ts @@ -21,6 +21,8 @@ require('services/HtmlEscaperService.ts'); // Each visualization receives three variables: 'data', 'options', and // 'isAddressed'. The exact format for each of these is specific to the // particular visualization. +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaVisualizationBarChart', [function() { return { restrict: 'E', diff --git a/extensions/visualizations/OppiaVisualizationEnumeratedFrequencyTableDirective.ts b/extensions/visualizations/OppiaVisualizationEnumeratedFrequencyTableDirective.ts index 91892b5acc98..ffc6c2f8c0a2 100644 --- a/extensions/visualizations/OppiaVisualizationEnumeratedFrequencyTableDirective.ts +++ b/extensions/visualizations/OppiaVisualizationEnumeratedFrequencyTableDirective.ts @@ -22,6 +22,8 @@ require('services/HtmlEscaperService.ts'); // Each visualization receives three variables: 'data', 'options', and // 'isAddressed'. The exact format for each of these is specific to the // particular visualization. +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaVisualizationEnumeratedFrequencyTable', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/extensions/visualizations/OppiaVisualizationFrequencyTableDirective.ts b/extensions/visualizations/OppiaVisualizationFrequencyTableDirective.ts index b544f5fe70a9..0c40e33a6245 100644 --- a/extensions/visualizations/OppiaVisualizationFrequencyTableDirective.ts +++ b/extensions/visualizations/OppiaVisualizationFrequencyTableDirective.ts @@ -22,6 +22,8 @@ require('services/HtmlEscaperService.ts'); // Each visualization receives three variables: 'data', 'options', and // 'isAddressed'. The exact format for each of these is specific to the // particular visualization. +var oppia = require('AppInit.ts').module; + oppia.directive('oppiaVisualizationFrequencyTable', [ 'UrlInterpolationService', function(UrlInterpolationService) { return { diff --git a/package-lock.json b/package-lock.json index 79ee0d9c2dbc..006cc053af61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,78 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@angular/common": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-8.0.3.tgz", + "integrity": "sha512-2YLYGVUf9eJZcocRmD3/9UHj4qFHt2t4ftDWJmrFM9zo2PZF+G5O9fASO7qoBbwpx3KFZtQO4dprKl2dFugRjg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/compiler": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.0.3.tgz", + "integrity": "sha512-1/vF8D6l1O6IfWiDtaj6nC+B8CtkVtFgXgooDzLBO6XAkaCuJCnhKT1HnpWG5GtVsGaY9MGoTl1vE9ZMDbRQjg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/core": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-8.0.3.tgz", + "integrity": "sha512-IIxrtIPNuv2+HudER9J1nmPGiGJ4aRpeiFM9V4lSiSFv50RzuaoG60XqYIpUyuBdgvyKigcrfSbu9+x1vyN0hw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/forms": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-8.0.3.tgz", + "integrity": "sha512-22s82QDRQ72K4vMYuNh3NAN+da9uanwoydnfKlp2rb9dZAb2QVX9NN6gSoMrkSSr2O9KTP6pWiw6A3/MW8sGRA==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/platform-browser": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-8.0.3.tgz", + "integrity": "sha512-ceAPP2Ijmk2sZ1rnOU/WNlE3DtT6K6ljpjO9oUfXKMoSMdWirJKAraT3m/BAzmYwMSXpPBxA7c3paZjiLL6t5A==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/platform-browser-dynamic": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.3.tgz", + "integrity": "sha512-ZjQjSYslSQAKzM4llvyMFxnSjFpbhT1U9FOdKwscPe475zAKX0087qsHrP2CRwkJRfwtdcmj9wMUQIPlzMpHLA==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/router": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-8.0.3.tgz", + "integrity": "sha512-CU5pLTfQVUnTN93mdIKJrVjXiNldUkk30DPz4lpdxpZjYOqFGXeeSeQWmToHSofLPodNcAB4kkZ41VyXvlBu7w==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "@angular/upgrade": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@angular/upgrade/-/upgrade-8.0.3.tgz", + "integrity": "sha512-ZtV7KHqfPbrCRLZb7cwR2IVLvM05PLARdf+Gl0upiDHZTXBEAloPsWo8a08ocgTqyYfRZy2KpY4Fn+gH+KlYbw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -941,6 +1013,18 @@ "dev": true, "optional": true }, + "angular": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/angular/-/angular-1.6.6.tgz", + "integrity": "sha1-/Vo8+0N844LYVO4BEgeXl4Uny2Q=", + "dev": true + }, + "angular-route": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/angular-route/-/angular-route-1.6.6.tgz", + "integrity": "sha1-jBF0iqGVxxexthWn50ZEK/x8YfQ=", + "dev": true + }, "ansi-colors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", @@ -1628,6 +1712,12 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, + "bootstrap": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", + "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2086,7 +2176,6 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -5649,6 +5738,12 @@ "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", "dev": true }, + "jquery": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", + "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6442,6 +6537,12 @@ } } }, + "moment": { + "version": "2.19.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.3.tgz", + "integrity": "sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8=", + "dev": true + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -6474,13 +6575,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -7750,6 +7844,12 @@ "strip-indent": "^1.0.1" } }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -11026,6 +11126,12 @@ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", "dev": true + }, + "zone.js": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.9.1.tgz", + "integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag==", + "dev": true } } } diff --git a/package.json b/package.json index b1c2278baaf8..0e9124314492 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,14 @@ }, "homepage": "https://github.com/oppia/oppia#readme", "devDependencies": { + "@angular/common": "^8.0.0", + "@angular/compiler": "^8.0.0", + "@angular/core": "^8.0.0", + "@angular/forms": "^8.0.0", + "@angular/platform-browser": "^8.0.0", + "@angular/platform-browser-dynamic": "^8.0.0", + "@angular/router": "^8.0.0", + "@angular/upgrade": "^8.0.0", "@mapbox/stylelint-processor-arbitrary-tags": "^0.2.0", "@types/angular": "^1.6.54", "@types/angular-animate": "^1.5.10", @@ -37,11 +45,15 @@ "@types/select2": "^4.0.48", "@types/selenium-webdriver": "^4.0.0", "@typescript-eslint/parser": "^1.7.0", + "angular": "1.6.6", + "angular-route": "1.6.6", "ajv": "^6.10.0", "babel-eslint": "^10.0.1", + "bootstrap": "3.4.1", "browserstack-local": "^1.3.7", "cache-loader": "^3.0.1", "clean-webpack-plugin": "^2.0.1", + "core-js": "^2.5.3", "dotenv": "^7.0.0", "enhanced-resolve": "^4.1.0", "eslint": "^5.16.0", @@ -55,6 +67,7 @@ "htmllint-cli": "0.0.7", "jasmine-core": "^3.4.0", "jasmine-spec-reporter": "^4.2.1", + "jquery": "^3.4.0", "karma": "^4.1.0", "karma-chrome-launcher": "^2.2.0", "karma-coverage": "^1.1.2", @@ -62,9 +75,13 @@ "karma-json-fixtures-preprocessor": "^0.0.6", "karma-ng-html2js-preprocessor": "^1.0.0", "karma-webpack": "^4.0.0-rc.3", + "lodash": "4.17.11", + "moment": "2.19.3", "postcss-syntax": "^0.36.2", "protractor": "^5.4.2", "protractor-screenshot-reporter": "0.0.5", + "reflect-metadata": "^0.1.12", + "rxjs": "^6.4.0", "stylelint": "^10.0.1", "stylelint-config-standard": "^18.3.0", "thread-loader": "^2.1.2", @@ -75,7 +92,8 @@ "webdriver-manager": "^12.1.4", "webpack": "^4.30.0", "webpack-cli": "^3.3.1", - "yargs": "^13.2.2" + "yargs": "^13.2.2", + "zone.js": "^0.9.1" }, "keywords": [] } diff --git a/scripts/run_frontend_tests.sh b/scripts/run_frontend_tests.sh index 3ff538f30ac5..71006ed0cf5e 100755 --- a/scripts/run_frontend_tests.sh +++ b/scripts/run_frontend_tests.sh @@ -51,6 +51,14 @@ export DEFAULT_SKIP_INSTALLING_THIRD_PARTY_LIBS=false export DEFAULT_RUN_MINIFIED_TESTS=false maybeInstallDependencies "$@" +# The following command finds all the spec files (except known failing files; +# corresponding issue -> https://github.com/oppia/oppia/issues/6960) +# and merges them all to a single file which Karma uses to run its tests. The +# Karma is unable to run the tests on multiple files and the DI fails in that +# case, the reason of which is unclear. +# (related issue -> https://github.com/oppia/oppia/issues/7053). +find . -type f \( -name "*.spec.ts" ! -name "solution-verification.service.spec.ts" ! -name "state-name-editor.directive.spec.ts" ! -name "state-content-editor.directive.spec.ts" ! -name "state-interaction-editor.directive.spec.ts" ! -name "combined-tests.spec.ts" -o -name "*Spec.ts" ! -name "MusicNotesInputSpec.ts" \) -exec cat {} \; > ./core/templates/dev/head/combined-tests.spec.ts + echo "" echo " View interactive frontend test coverage reports by navigating to" echo "" @@ -73,4 +81,7 @@ if [ "$RUN_MINIFIED_TESTS" = "true" ]; then $XVFB_PREFIX $NODE_MODULE_DIR/karma/bin/karma start core/tests/karma.conf.ts --prodEnv fi +# The following command removes the file formed by combining the spec files. +rm ./core/templates/dev/head/combined-tests.spec.ts + echo Done! diff --git a/tsconfig.json b/tsconfig.json index c855d1e6a99a..7d68a678af86 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,9 @@ "rootDir": ".", "skipLibCheck": true, "target": "es5", - "typeRoots": ["./node_modules/@types"] + "typeRoots": ["./node_modules/@types"], + "experimentalDecorators": true, + "emitDecoratorMetadata": true }, "files_explanation": "These files are included separately since we still do not have webpack in extensions folder and these files are still included through scripts tags, so they need to be compiled separately.", "files": [ @@ -15,7 +17,6 @@ "assets/rich_text_components_definitions.js", "core/tests/karma-globals.ts", "core/tests/karma.conf.ts", - "core/templates/dev/head/AppInit.ts", "core/templates/dev/head/mathjaxConfig.ts", "core/templates/dev/head/expressions/ExpressionParserService.js" ], diff --git a/webpack.config.ts b/webpack.config.ts index 2cb6892f9a6a..a11ad8d2f50c 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -33,7 +33,6 @@ module.exports = { entries: { about: commonPrefix + '/pages/about-page/about-page.scripts.ts', admin: commonPrefix + '/pages/admin-page/admin-page.scripts.ts', - app: commonPrefix + '/App.ts', collection_editor: commonPrefix + '/pages/collection-editor-page/' + 'collection-editor-page.scripts.ts', @@ -102,28 +101,27 @@ module.exports = { topics_and_skills_dashboard: ( commonPrefix + '/pages/topics-and-skills-dashboard-page/' + - 'topics-and-skills-dashboard-page.controller.ts' + 'topics-and-skills-dashboard-page.scripts.ts' ), topic_viewer: commonPrefix + '/pages/topic-viewer-page/topic-viewer-page.scripts.ts', }, plugins: [ new HtmlWebpackPlugin({ - chunks: ['app', 'admin'], + chunks: ['admin'], filename: 'admin-page.mainpage.html', template: commonPrefix + '/pages/admin-page/admin-page.mainpage.html', minify: htmlMinifyConfig, inject: false }), new HtmlWebpackPlugin({ - chunks: ['app'], filename: 'base.html', template: 'core/templates/dev/head/pages/base.html', minify: htmlMinifyConfig, inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'about'], + chunks: ['about'], filename: 'about-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -160,7 +158,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'contact'], + chunks: ['contact'], filename: 'contact-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -181,7 +179,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'donate'], + chunks: ['donate'], filename: 'donate-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -192,7 +190,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'email_dashboard'], + chunks: ['email_dashboard'], filename: 'email-dashboard-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -206,7 +204,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'email_dashboard_result'], + chunks: ['email_dashboard_result'], filename: 'email-dashboard-result.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -245,7 +243,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'get_started'], + chunks: ['get_started'], filename: 'get-started-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -257,7 +255,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'landing'], + chunks: ['landing'], filename: 'topic-landing-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -271,7 +269,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'learner_dashboard'], + chunks: ['learner_dashboard'], filename: 'learner-dashboard-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -292,7 +290,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'maintenance'], + chunks: ['maintenance'], filename: 'maintenance-page.mainpage.html', template: commonPrefix + '/pages/maintenance-page/maintenance-page.mainpage.html', @@ -300,7 +298,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'moderator'], + chunks: ['moderator'], filename: 'moderator-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -313,7 +311,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'privacy'], + chunks: ['privacy'], filename: 'privacy-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -325,7 +323,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'notifications_dashboard'], + chunks: ['notifications_dashboard'], filename: 'notifications-dashboard-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -350,7 +348,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'preferences'], + chunks: ['preferences'], filename: 'preferences-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -377,7 +375,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'signup'], + chunks: ['signup'], filename: 'signup-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -397,7 +395,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'splash'], + chunks: ['splash'], filename: 'splash-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -410,7 +408,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'splash'], + chunks: ['splash'], filename: 'splash_at0.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -436,7 +434,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'stewards'], + chunks: ['stewards'], filename: 'stewards-landing-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -469,7 +467,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'teach'], + chunks: ['teach'], filename: 'teach-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -482,7 +480,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'terms'], + chunks: ['terms'], filename: 'terms-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -495,7 +493,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'thanks'], + chunks: ['thanks'], filename: 'thanks-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', @@ -515,7 +513,7 @@ module.exports = { inject: false }), new HtmlWebpackPlugin({ - chunks: ['app', 'topics_and_skills_dashboard'], + chunks: ['topics_and_skills_dashboard'], filename: 'topics-and-skills-dashboard-page.mainpage.html', meta: { name: 'Personalized Online Learning from Oppia', diff --git a/webpack.dev.config.ts b/webpack.dev.config.ts index 4c8fa12dd8d7..43bb46b2491b 100644 --- a/webpack.dev.config.ts +++ b/webpack.dev.config.ts @@ -24,8 +24,13 @@ module.exports = { resolve: { modules: [ path.resolve(__dirname, 'core/templates/dev/head'), - path.resolve(__dirname, 'extensions') + path.resolve(__dirname, 'extensions'), + path.resolve(__dirname, 'node_modules') ], + alias: { + '@angular/upgrade/static': ( + '@angular/upgrade/bundles/upgrade-static.umd.js') + } }, entry: commonWebpackConfig.entries, plugins: commonWebpackConfig.plugins, diff --git a/webpack.prod.config.ts b/webpack.prod.config.ts index d2da138d2d5c..858aaa77943f 100644 --- a/webpack.prod.config.ts +++ b/webpack.prod.config.ts @@ -24,8 +24,13 @@ module.exports = { resolve: { modules: [ path.resolve(__dirname, 'core/templates/dev/head'), - path.resolve(__dirname, 'extensions') + path.resolve(__dirname, 'extensions'), + path.resolve(__dirname, 'node_modules') ], + alias: { + '@angular/upgrade/static': ( + '@angular/upgrade/bundles/upgrade-static.umd.js') + } }, entry: commonWebpackConfig.entries, plugins: commonWebpackConfig.plugins,