[AngularJS] Re: Loading Config in AppModule

2017-05-01 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
For anyone interested, this was my solution. import { FirebaseConfigInterface } from './interfaces/firebase-config.interface'; export class AppConfig { public static site = { meta_title: null, app_id: null }; public static firebaseConfig: FirebaseConfigInterface = {

[AngularJS] Loading Config in AppModule

2017-04-29 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
Hello again, I'm building an Angular 4 app with Firebase, and I do not want to save my Firebase configuration/initialization parameters in my app.modules.ts file - as this file is to be committed to my repo. In dev mode, I was able to save the parameters using `export default {firebase {...}}`

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
:D On Friday, 28 April 2017 19:29:15 UTC+1, b...@sfi.ca wrote: > > The best part of this thread is you figured out the problem. > > The 2nd best part is the word KABLOOWEE!! which I haven't seen in ages.. > love it! ;-) > > -- You received this message because you are subscribed to the Google

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
Yeah, that was my bad. Would have expected it to fail in dev mode as well though. Thanks again :). On Friday, 28 April 2017 19:26:05 UTC+1, Sander Elias wrote: > > I see both formControlName and ngModel. I think you should only use one of > those. For template driven forms you use ngModel, fo

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
Eureka!!! I finally figured it out. Thanks Sander, you made me realize that I was looking in the wrong place, and the `ng serve --aot true --prod` command was a great help. The problem is that I was using formControlName, and [(ngModel)] directives together. I removed the latter and presto :D.

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
The thing is, I need the form to be a model driven form, for the purpose of validation. On Friday, 28 April 2017 18:53:08 UTC+1, Benjamin Ugbene wrote: > > > > On Friday, 28 April 2017 18:52:16 UTC+1, Benjamin Ugbene wrote: >> >> I just discovered something. The error actually occurs when I use t

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
On Friday, 28 April 2017 18:52:16 UTC+1, Benjamin Ugbene wrote: > > I just discovered something. The error actually occurs when I use the > 'formControlName' directive on an element. > > I was able to get it to display fine with the form element alone, and with > a template driven form element.

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
I just discovered something. The error actually occurs when I use the 'formControlName' directive on an element. I was able to get it to display fine with the form element alone, and with a template driven form element. On Friday, 28 April 2017 18:35:10 UTC+1, Benjamin Ugbene wrote: > > Please

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
Please see attached On Friday, 28 April 2017 18:32:26 UTC+1, Sander Elias wrote: > > Can you run a ng version, and paste the output here? > Are you sure your forms module is on the same version as the rest of > angular? > > Regards > Sander > -- You received this message because you are subscri

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
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!! {{ page_title }} {{ error }}

[AngularJS] Re: Angular 4 Production

2017-04-28 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
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 wrot

[AngularJS] Re: Angular 4 Production

2017-04-27 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
Hi Sander, Thanks for replying, and for taking an interest. Please see attached screenshots for one of the examples. I have attached two files. One shows how the page renders when it loads using `ng serve`, the other shows what the production build looks like. Any clue as to why this would hap

[AngularJS] Angular 4 Production

2017-04-26 Thread 'Benjamin Ugbene' via Angular and AngularJS discussion
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 prope