Skip to content

Commit

Permalink
Revert "Introduction to Angular 8. (oppia#7027)" (oppia#7038)
Browse files Browse the repository at this point in the history
This reverts commit e1bb364.
  • Loading branch information
seanlip authored Jun 28, 2019
1 parent e1bb364 commit 7038a63
Show file tree
Hide file tree
Showing 726 changed files with 1,134 additions and 2,251 deletions.
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"extends": [
"eslint:recommended"
"eslint:recommended",
],
"plugins": [
"angular",
Expand Down
2 changes: 0 additions & 2 deletions core/templates/dev/head/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ 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',
Expand Down
30 changes: 1 addition & 29 deletions core/templates/dev/head/AppInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,11 @@
* @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',
downgradedModule
'toastr', 'ui.bootstrap', 'ui.sortable', 'ui.tree', 'ui.validate'
].concat(
window.GLOBALS ? (window.GLOBALS.ADDITIONAL_ANGULAR_MODULES || []) : []));

exports.module = oppia;
2 changes: 0 additions & 2 deletions core/templates/dev/head/I18nFooter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* @author milagro.teruel@gmail.com (Milagro Teruel)
*/

var oppia = require('AppInit.ts').module;

oppia.controller('I18nFooter', [
'$cookies', '$http', '$rootScope', '$scope', '$timeout', '$translate',
'UserService',
Expand Down
2 changes: 0 additions & 2 deletions core/templates/dev/head/app.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* @fileoverview Shared constants for the Oppia module.
*/

var oppia = require('AppInit.ts').module;

for (var constantName in constants) {
oppia.constant(constantName, constants[constantName]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ require('pages/OppiaFooterDirective.ts');

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('baseContent', [
'UrlInterpolationService',
function(UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('warningLoader', [
'UrlInterpolationService',
function(UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('socialButtons', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ 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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('services/AlertsService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('alertMessage', [function() {
return {
restrict: 'E',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/BrowserCheckerService.ts');
require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('attributionGuide', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('backgroundBanner', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('loadingDots', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('sideNavigationBar', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ 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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ 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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.factory('QuestionCreationService', [
'$http', '$q', 'UrlInterpolationService',
function($http, $q, UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/UrlInterpolationService.ts');
require('services/AlertsService.ts');

var oppia = require('AppInit.ts').module;

oppia.factory('SkillCreationService', [
'$http', '$rootScope', '$timeout', '$window', 'AlertsService',
'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ 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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/UrlInterpolationService.ts');
require('services/IdGenerationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('audioFileUploader', [
'IdGenerationService', 'UrlInterpolationService',
function(IdGenerationService, UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/UrlInterpolationService.ts');
require('services/IdGenerationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('imageUploader', [
'IdGenerationService', 'UrlInterpolationService',
function(IdGenerationService, UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

// 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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('select2Dropdown', [
'UrlInterpolationService', function(UrlInterpolationService) {
// Directive for incorporating select2 dropdowns.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* mark_all_audio_and_translations_as_needing_update modal.
*/

var oppia = require('AppInit.ts').module;

oppia.controller('MarkAllAudioAndTranslationsAsNeedingUpdateController', [
'$scope', '$uibModalInstance',
function($scope, $uibModalInstance) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('schemaBasedBoolEditor', [
'UrlInterpolationService',
function(UrlInterpolationService) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/UrlInterpolationService.ts');
require('services/NestedDirectivesRecursionTimeoutPreventionService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('schemaBasedChoicesEditor', [
'NestedDirectivesRecursionTimeoutPreventionService',
'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
require('domain/utilities/UrlInterpolationService.ts');
require('services/NestedDirectivesRecursionTimeoutPreventionService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('schemaBasedCustomEditor', [
'NestedDirectivesRecursionTimeoutPreventionService',
'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ require('domain/utilities/UrlInterpolationService.ts');
require('services/IdGenerationService.ts');
require('services/NestedDirectivesRecursionTimeoutPreventionService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('schemaBasedDictEditor', [
'NestedDirectivesRecursionTimeoutPreventionService',
'UrlInterpolationService',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ require(

require('domain/utilities/UrlInterpolationService.ts');

var oppia = require('AppInit.ts').module;

oppia.directive('schemaBasedEditor', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
Expand Down
Loading

0 comments on commit 7038a63

Please sign in to comment.