Projet

Général

Profil

Révision 2c8d373c src/app/home/home.component.ts

Voir les différences:

src/app/home/home.component.ts
13 13
import { ActivityIndicator } from "tns-core-modules/ui/activity-indicator";
14 14
import { getString, setString, hasKey, remove, clear } from "tns-core-modules/application-settings";
15 15
import { Button } from "tns-core-modules/ui/button";
16
import { NavigationEnd, Router } from "@angular/router";
17
import { RouterExtensions } from "nativescript-angular/router";
16 18

  
17 19
import * as bghttp from "nativescript-background-http";
18 20
import * as appversion from "nativescript-appversion";
......
44 46
    public isBusy: boolean = true;
45 47

  
46 48

  
47
    constructor() {
49
    constructor(private router: Router, private routerExtensions: RouterExtensions) {
48 50
        // Use the component constructor to inject providers.
49 51
        appversion.getVersionName().then((v: string) => {
50 52
            if (isAndroid) {
......
73 75
        this.label = "";
74 76
        this.legende = "";
75 77
        this.isBusy = false;
76
        this.enableButtons("btnSendPicture", false)
78
        this.enableButtons("btnSendPicture", false);
79

  
80
        if (this.email == "" || this.pseudo == "") {
81
            // alert("L'application n'est pas configurée ...")
82
            this.routerExtensions.navigate(["/settings"]);
83
        }
84

  
77 85
    }
78 86

  
79 87
    enableButtons(btnName, onOff) {

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux