[AngularJS] Re: Error by Build my Angular 4 Project for Production with --prod

2017-08-21 Thread Bernd Wachter
Hi Elias, i test and delete the @Injectable from this Class! but when i do this and run my App the App is not working anymore! and i become the following Error in the Console: compiler.es5.js:1690 Uncaught Error: Can't resolve all parameters for NgCartItem: (?, ?, ?, ?, ?, ?, ?, ?, ?). at sy

[AngularJS] Re: Angular 2 project structure, ports and routing table

2017-08-21 Thread Sander Elias
Hi Ranjeet, create a local server on port 3000 and deploy both of your apps to that server. The OS won't allow you to run 2 programs on the same port. As an alternative, you can run a reverse proxy(I use nginx fir this) to forward the requests to their own server. Regards Sander -- You recei

[AngularJS] Re: Trying to iterate through an Array

2017-08-21 Thread Sander Elias
Hi Nicolas, I don't think your 'myArray' is an actual array. I suspect it's a object. check it out by logging the following: console.log(typeOf myArray, Array.isArray(myArray)) I suspect the answer will be 'object, false' Regards Sander -- You received this message because you are subscribed

[AngularJS] Angular 2 project structure, ports and routing table

2017-08-21 Thread Ranjeet Kuruvilla
I have 2 angular 2 modules. If I load them, one listens to port 3000 and the other one to 3002. I do not want that, instead I want I want the first module to listen to localhost:3000/module1 and the other one to localhost:3000/module2. -- You received this message because you are subscribed to

[AngularJS] Re: Error by Build my Angular 4 Project for Production with --prod

2017-08-21 Thread Sander Elias
Hi Bernd, Yes, the class should not be decorated with the @injectable. That is the thing that makes AOT create an injector for this class. Will not work. Regards Sander -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To un

[AngularJS] Re: Trying to iterate through an Array

2017-08-21 Thread Tito
what are you populating your array with? also you are missing a closing ) on that loop for (var i=0; i > Hello, > > I'm trying to iterate through an Array, as follows: > > myArray = new Array(); > ... > console.log(myArray); > console.log("*** myArray.length", myArray.length); > for (let m of myArr

[AngularJS] Re: Error by Build my Angular 4 Project for Production with --prod

2017-08-21 Thread Bernd Wachter
Hi Sander, this is the ngcartitem.ts File who gives the Error.. you see some Problem in this Code? import { Injectable,Input, Output, EventEmitter } from '@angular/core'; import { NgCartService} from '../ngcart/ngcart.service' @Injectable() export class NgCartItem { constructor(public id:

[AngularJS] Trying to iterate through an Array

2017-08-21 Thread nicolas duminil
Hello, I'm trying to iterate through an Array, as follows: myArray = new Array(); ... console.log(myArray); console.log("*** myArray.length", myArray.length); for (let m of myArray) { console.log(m); } Running this code, correctly displays the content of myArray array, there are 7 MyStuff ele

[AngularJS] Is Angularjs possible to create some config json files that not built in js file?

2017-08-21 Thread Abby Leung
Hi guys, Is it possible to create some config json files that not built in js file? Now we use grunt + browserify to bundle and compress, and want to create some config json files to change some actions in angular app without building with js files, i.e: if we change the config json file, then w