-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathfeatures.component.ts
More file actions
80 lines (70 loc) · 2.92 KB
/
Copy pathfeatures.component.ts
File metadata and controls
80 lines (70 loc) · 2.92 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { Component, OnInit } from '@angular/core';
import { Feature } from './feature';
import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';
@Component({
selector: 'ncg-features',
templateUrl: './features.component.html'
})
export class FeaturesComponent implements OnInit {
features: Feature[];
featuresObservable: FirebaseListObservable<Feature[]>;
constructor(public db: AngularFireDatabase) { }
ngOnInit() {
this.features =
[
{
name: 'Angular CRUD Code Generator',
desc: 'Download full source code for apps based on your schema in seconds. For enterprise teams, create your own template-sets and push directly to your local machine/environment for quick development.',
url: 'http://ncg-test-ncg-ng-md.azurewebsites.net',
imgUrl: 'https://cdn-images-1.medium.com/max/800/1*Zl0lsY09eO5y-mnYO18gUg.png',
imgData: '',
order: 1
},
{
name: 'Template Sets',
desc: 'Use our ever-growing library of template-sets that output Angular, Material Design, Bootstrap, Kendo UI, ionic, electron, React, Xamarin, .NET, JAVA, and countless other frameworks and component libraries.',
url: 'http://ncg-test-ncg-ng-kui.azurewebsites.net',
imgUrl: 'https://cdn-images-1.medium.com/max/800/1*Zl0lsY09eO5y-mnYO18gUg.png',
imgData: '',
order: 2
},
{
name: 'Internal Memory DB',
desc: 'The app code has an internal database so you can develop/proto-type without any REST-API/database, and switch over to the REST service when ready.',
url: 'http://ncg-test-ncg-ionic.azurewebsites.net',
imgUrl: 'https://cdn-images-1.medium.com/max/800/1*Zl0lsY09eO5y-mnYO18gUg.png',
imgData: '',
order: 3
},
{
name: 'e2e Protractor/Jasmin/Karma code',
desc: 'We currently generate starter e2e automated UI code for end-to-end testing.',
url: 'http://ncg-test-ncg-acw-bs.azurewebsites.net',
imgUrl: 'https://cdn-images-1.medium.com/max/800/1*Zl0lsY09eO5y-mnYO18gUg.png',
imgData: '',
order: 4
},
{
name: 'Schema Editor',
desc: 'We are working on a nice schema editor... stay tuned for details!',
url: 'http://ncg-test-ncg-acw-bs.azurewebsites.net',
imgUrl: 'https://cdn-images-1.medium.com/max/800/1*Zl0lsY09eO5y-mnYO18gUg.png',
imgData: '',
order: 5
}
];
this.featuresObservable = this.db.list("/features");
// init
// this.features.forEach(
// feature => {
// this.featuresObservable.push(feature);
// }
// );
this.featuresObservable.subscribe(snapshot => {
if(snapshot && snapshot.length) {
this.features = snapshot;
console.log(snapshot);
}
});
}
}