-
Notifications
You must be signed in to change notification settings - Fork 5
/
app-angularjs.module.ts
38 lines (35 loc) · 1.4 KB
/
app-angularjs.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import * as angular from 'angular';
import 'angular-animate';
import 'angular-aria';
import 'angular-messages';
import 'angular-material';
import './templates/index';
import { downgradeComponent, downgradeModule } from '@angular/upgrade/static';
import { AppComponent } from '../angular/app.component';
import { appAngularJSComponent } from './app-angularjs.component';
import { versionStampComponent } from './version-stamp.component';
import { tabsComponent } from './tabs.component';
import { bootstrapAngular } from './bootstrap-module';
const downgradedModule = downgradeModule(bootstrapAngular);
const configFunction = ($mdThemingProvider, $mdGestureProvider) => {
$mdThemingProvider
.theme('default')
.primaryPalette('indigo')
.accentPalette('green', { default: '500' })
.backgroundPalette('grey', { default: 'A100' });
$mdGestureProvider.skipClickHijack();
};
configFunction.$inject = ['$mdThemingProvider', '$mdGestureProvider'];
export const appAngularjsModule = angular
.module('AngularJSApp', ['ngMaterial', 'ngMessages', 'templates', downgradedModule])
.config(configFunction)
.component(appAngularJSComponent.selector, appAngularJSComponent)
.component(versionStampComponent.selector, versionStampComponent)
.component(tabsComponent.selector, tabsComponent)
.directive(
AppComponent.selector,
downgradeComponent({
component: AppComponent,
downgradedModule,
})
);