director-view.ts 1.56 KB
Newer Older
Open Source Developer's avatar
Open Source Developer committed
1
2
3
4
5
6
import { Component, OnInit, OnDestroy,ElementRef, ViewChild} from "@angular/core";
import { Injectable } from "@angular/core";
import { AppSettings } from '../../app.settings';
import { HelperDataService } from '../../services/helper-data-service';
import {Observable} from "rxjs/Observable";
import {Http, Headers, RequestOptions} from '@angular/http';
Open Source Developer's avatar
tran    
Open Source Developer committed
7
import { NgRedux, select } from 'ng2-redux';
Open Source Developer's avatar
Open Source Developer committed
8
9
10
11
12
13
14
import { IAppState } from '../../store/store';
import {Router, ActivatedRoute, Params} from '@angular/router';
import { BehaviorSubject, Subscription } from 'rxjs/Rx';

@Component({
    selector: 'director-view',
    template: `
Open Source Developer's avatar
tran    
Open Source Developer committed
15
16
17
18
19
20
21
22
23
24
25
          
    
    
              <label for="name">Παρακαλώ επιλέξτε τάξη </label><br/>
                    <select>
                        <option value=1>Α' Λυκείου</option>
                        <option value=2>Β' Λυκείου</option>
                        <option value=3>Γ' Λυκείου</option>
                    </select>

           
Open Source Developer's avatar
Open Source Developer committed
26
27
28
29
30
31
32
33
   `
})

@Injectable() export default class DirectorView implements OnInit , OnDestroy{

   
    private StudentSelected$: BehaviorSubject<any>;
    private StudentSelectedSub: Subscription;
Open Source Developer's avatar
tran    
Open Source Developer committed
34
       
Open Source Developer's avatar
Open Source Developer committed
35
36
37
38
39
40
41
42
43
44
45
46
47
    constructor(private _hds: HelperDataService, 
                private activatedRoute: ActivatedRoute,
                private router: Router )
    {
       this.StudentSelected$ = new BehaviorSubject([{}]);
    }

    ngOnDestroy()
    {
        if (this.StudentSelectedSub)
            this.StudentSelectedSub.unsubscribe();

    }
Open Source Developer's avatar
tran    
Open Source Developer committed
48
 
Open Source Developer's avatar
Open Source Developer committed
49
50
    ngOnInit() {
     
Open Source Developer's avatar
tran    
Open Source Developer committed
51
52
   
           
Open Source Developer's avatar
Open Source Developer committed
53
54
55
56
57
58

    }



}