Hello,
I’m having the following problem while doing the build
C:\PactoJ\Desenvolvimento\Sistemas\AppGestor>ionic build android
> AppGestor@ ionic:build C:\PactoJ\Desenvolvimento\Sistemas\AppGestor
> ionic-app-scripts build
[00:43:20] ionic-app-scripts 0.0.45
[00:43:20] build prod started ...
[00:43:20] clean started ...
[00:43:20] clean finished in 6 ms
[00:43:20] copy started ...
[00:43:20] ngc started ...
[00:43:20] copy finished in 499 ms
[00:43:25] can't resolve module ../pages/login/login.ts from
C:/PactoJ/Desenvolvimento/Sistemas/AppGestor/.tmp/app/app.module.ts
[00:43:25] Error: Source file C:/PactoJ/Desenvolvimento/Sistemas/AppGestor/.tmp/pages/login/login.ts not present in
program., resolving symbol AppModule in C:/PactoJ/Desenvolvimento/Sistemas/AppGestor/.tmp/app/app.module.ts,
resolving symbol AppModule in C:/PactoJ/Desenvolvimento/Sistemas/AppGestor/.tmp/app/app.module.ts
[00:43:25] ngc failed
[00:43:25] ionic-app-script task: "build"
[00:43:25] Error: Error
I <3 Ionic.
Happy hacking sunny
Please post your app.module.ts and your login.ts
App.Module
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { LoginPage } from '../pages/login/login.ts';
import { HomePage } from '../pages/home/home.ts';
import {LoginService} from '../service/login.service.ts'
import {Configuration} from '../app.configuration.ts';
import {AppService} from '../service/app.service.ts';
import {SuperService} from '../service/super.service.ts';
import {GestaoService} from '../service/gestao.service.ts';
import {DadosGameService} from '../service/dadosGame.service.ts';
@NgModule({
declarations: [
MyApp,
LoginPage,
HomePage
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
LoginPage,
HomePage
],
providers: [LoginService,Configuration,AppService,SuperService,GestaoService,DadosGameService]
})
export class AppModule {}
Login.ts
import { Component } from '@angular/core';
import {NavController} from 'ionic-angular';
import {LoginService} from "../../service/login.service";
import {Usuario} from "../../model/basico/usuario/usuario";
import {HomePage} from "../home/home.ts";
import {SuperService} from "../../service/super.service";
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
userName:string;
pwd : string;
public usuario : Usuario = new Usuario();
constructor(public navCtrl: NavController,private loginService : LoginService,public superService : SuperService) {
}
login() {
this.superService.showLoading('Autenticando usuário');
this.superService.loading.present();
this.loginService.descobrirEmpresa(this.userName)
.subscribe(
data =>{
this.superService.setEmpresaLogada(this.superService.tratarErroRequisicao(data));
this.loginService.loginEmpresa(this.superService.getEmpresaLogada(),this.userName,this.pwd)
.subscribe(
data =>{
this.superService.setUsuarioLogado(this.superService.tratarErroRequisicao(data));
this.superService.loading.dismissAll();
this.navCtrl.setRoot(HomePage);
},
err =>{
this.superService.showErro(err);
}
)
},
err =>{
this.superService.showErro(err);
}
)
}
}