Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Versions.
- ALL UP TO DATE TODAY (2017-08-23)
- @angular/cli: 1.3.1
- node: 8.3.0
- os: win32 x64
- @angular/animations: 4.3.5
- @angular/common: 4.3.5
- @angular/compiler: 4.3.5
- @angular/core: 4.3.5
- @angular/forms: 4.3.5
- @angular/http: 4.3.5
- @angular/platform-browser: 4.3.5
- @angular/platform-browser-dynamic: 4.3.5
- @angular/router: 4.3.5
- @angular/cli: 1.3.1
- @angular/compiler-cli: 4.3.5
- @angular/language-service: 4.3.5
- ### Repro steps.
- <!--
- Simple steps to reproduce this bug.
- Please include: commands run, packages added, related code changes.
- A link to a sample repo would help too.
- -->
- ###
- ### Method 1 WITH Parameter - Compile **with** ERROR using ng build --prod ( with aot ) and **without** ERROR when compile using ng build --prod --aot=false (without aot)
- **Into the service:**
- `
- @Injectable()
- export class MvsTest {
- public Test: string = "";
- constructor(param: string) {
- this.Test = param;
- }
- }
- `
- **into the other service**
- `
- @Injectable()
- export class ApplicationService {
- public test1 = new MvsTest ('New1');
- public test2 = new MvsTest ('New'2);
- constructor() { }
- }
- `
- ### Method 2 WITHOUT Parameter - Compile **without** ERROR using ng build --prod ( with aot ) and **without** ERROR when compile using ng build --prod --aot=false (without aot)
- **Into the service:**
- `
- @Injectable()
- export class MvsTest {
- public Test: string = "";
- constructor() { }
- }
- `
- **into the other service**
- `
- @Injectable()
- export class ApplicationService {
- public test1 = new MvsTest ();
- public test2 = new MvsTest ();
- constructor() {
- this.test1.Test= 'New1';
- this.test2.Test= 'New2';
- }
- }
- `
- ### The log given by the failure.
- <!-- Normally this include a stack trace and some more information. -->
- ERROR in Can't resolve all parameters for MvsTest in C:/DEVELOPER/_SHARED/mvs-test/mvs-test.service.ts: (?).
- ERROR in ./src/main.ts..... etc...etc...etc...
- ERROR in Can't resolve all parameters for MvsTest in C:/DEVELOPER/src/app/_SHARED/mvs-test/mvs-test.service.ts: (?).
- ERROR in ./src/main.ts
- Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:DEVELOPERsrc'
- resolve './$$_gendir/app/app.module.ngfactory' in 'C:DEVELOPERsrc'
- using description file: C:DEVELOPERpackage.json (relative path: ./src)
- Field 'browser' doesn't contain a valid alias configuration
- after using description file: C:DEVELOPERpackage.json (relative path: ./src)
- using description file: C:DEVELOPERpackage.json (relative path: ./src/$$_gendir/app/app.module.ngfactory)
- no extension
- Field 'browser' doesn't contain a valid alias configuration
- C:DEVELOPERsrc$$_gendirappapp.module.ngfactory doesn't exist
- .ts
- Field 'browser' doesn't contain a valid alias configuration
- C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.ts doesn't exist
- .js
- Field 'browser' doesn't contain a valid alias configuration
- C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.js doesn't exist
- as directory
- C:DEVELOPERsrc$$_gendirappapp.module.ngfactory doesn't exist
- [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory]
- [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.ts]
- [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.js]
- [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory]
- @ ./src/main.ts 3:0-74
- @ multi ./src/main.ts
- ### Desired functionality.
- <!--
- What would like to see implemented?
- What is the usecase?
- -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement