Hi Sander,
Well, this still does not make sense, but it looks like the conflict is as
a result of form elements on the page. As soon as I add any form/input
elements... KABLOOWEE!!
<spinner class="centered" *ngIf="isLoading; else hymnForm"></spinner>
<ng-template #hymnForm>
<md-card class="hymn-card">
<md-card-title><h1>{{ page_title }}</h1></md-card-title>
<form [formGroup]="form" (ngSubmit)="save($event)">
<md-card-subtitle>
<span class="alert form-text alert-danger" *ngIf="error &&
form.touched">
{{ error }}
</span>
</md-card-subtitle>
<md-card-content>
<fieldset>
<div class="form-group">
<label for="number">
Hymn Number
<span class="required">*</span>
</label>
<input type="number"
mdInput
class="form-control"
id="number"
formControlName="number"
placeholder="Number"
[(ngModel)]="hymn.number">
<div *ngIf="form.controls.number.touched &&
form.controls.number.errors">
<span class="help-block alert alert-danger" *
ngIf="form.controls.number.errors.required">
Number is required.
</span>
<span class="help-block alert alert-danger" *
ngIf="form.controls.number.errors.numberRequired">
Please enter a numeric value.
</span>
</div>
</div>
<div class="form-group">
<label for="title">
Title
<span class="required">*</span>
</label>
<input type="text"
mdInput
class="form-control"
id="title"
formControlName="title"
placeholder="Title"
[(ngModel)]="hymn.title">
<div *ngIf="form.controls.title.touched &&
form.controls.title.errors">
<span class="help-block alert alert-danger" *
ngIf="form.controls.title.errors.required">
Title is required.
</span>
<span class="help-block alert alert-danger" *
ngIf="form.controls.title.errors.maxWidth">
Please enter a valid title.
</span>
</div>
</div>
<div class="form-group">
<label for="content">
Content
<span class="required">*</span>
</label>
<textarea
mdInput
class="form-control"
id="content"
formControlName="content"
placeholder="Content"
[(ngModel)]="hymn.content"></textarea>
<div *ngIf="form.controls.content.touched &&
form.controls.content.errors">
<span class="help-block alert alert-danger" *
ngIf="form.controls.content.errors.required">
Content is required.
</span>
</div>
</div>
<div class="form-group">
<label for="tags">
Tags
<span class="required">*</span>
</label>
<tag-input
mdInput
class="form-control"
id="tags"
theme='bootstrap'
formControlName="tags"
[modelAsStrings]="true"
[(ngModel)]='hymn.tags'></tag-input>
<div *ngIf="form.controls.tags.touched &&
form.controls.tags.errors">
<span class="help-block alert alert-danger" *
ngIf="form.controls.tags.errors.required">
Please provide at least one tag.
</span>
</div>
</div>
</fieldset>
<input type="hidden" id="$key" formControlName="$key" [(
ngModel)]="hymn.$key">
</md-card-content>
<md-card-footer>
<div class="button-row">
<button
type="button"
color="warn"
class="pull-left"
(click)="onGoBack()"
md-raised-button>Cancel</button>
<button
[disabled]="!form.valid"
type="submit"
color="primary"
class="pull-right"
md-raised-button>Save</button>
</div>
</md-card-footer>
</form>
</md-card>
</ng-template>
Simply putting the form element itself, triggers the conflict.
This makes no sense.
I tried removing the `md-card` components, but the buttons still did not
display properly.
Still investigating, but do you have any ideas please?
Best regards,
Benjamin
On Friday, 28 April 2017 15:43:16 UTC+1, Benjamin Ugbene wrote:
>
> Hi Sander,
>
> The same production issue happens, and still no errors. Thanks for that
> command though, I will take that page apart, component after component,
> till I find the culprit.
>
> Will let you know how I get on.
>
> Best regards,
> Ben
>
> On Thursday, 27 April 2017 07:59:06 UTC+1, Benjamin Ugbene wrote:
>>
>> Hi guys, let me start by saying that I'm new to Angular.
>>
>> I built a small application using a
>> Angular 4 (via Angular CLI), Angular Material 2, and Firebase 3.
>>
>> This application works perfectly when I run `ng serve`; however, when I
>> build using `ng build --prod --aot` some pages do not render properly, and
>> do not display any errors in the console.
>>
>> Any ideas please? I've spent a bit over a week researching deployment
>> methods and so far nothing has panned out. Actually deployed to Firebase,
>> and got the same result.
>>
>> Thanks in advance.
>>
>> Best regards,
>> Ben
>
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.