AOT compatibility enhancements (#2015)

* aot compatibility updates

- remove index files where needed
- move material dependencies to a separete module
- use aot compatible lambda functions for module export

* remove unused imports

* re-export Material module

* core module enhancements

- fix AOT issue with providers (use lambda instead of variable)
- move context menu to a separate module

* core module enhancements

* feature modules
This commit is contained in:
Denys Vuika
2017-06-30 22:20:12 +01:00
committed by Eugenio Romano
parent 182efb15b8
commit 70948c3533
16 changed files with 135 additions and 207 deletions

View File

@@ -15,11 +15,7 @@
* limitations under the License.
*/
import {
Component,
Input,
OnInit
} from '@angular/core';
import { Component, Input } from '@angular/core';
import { CardViewModel } from '../../models/card-view.model';
import * as moment from 'moment';
@@ -28,19 +24,11 @@ import * as moment from 'moment';
templateUrl: './adf-card-view.component.html',
styleUrls: ['./adf-card-view.component.css']
})
export class CardView implements OnInit {
export class CardView {
@Input()
properties: CardViewModel [];
constructor() {
}
ngOnInit() {
}
getPropertyValue(property: CardViewModel): string {
if (!property.value) {
return property.default;

View File

@@ -15,8 +15,19 @@
* limitations under the License.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CardView } from './adf-card-view.component';
export const VIEW_DIRECTIVES: [any] = [
CardView
];
@NgModule({
imports: [
CommonModule
],
declarations: [
CardView
],
exports: [
CardView
]
})
export class CardViewModule {}