Hi, yesterday I run yarn and I notice angular-cli 4.4.4 was installed and I 
noticed the missing of ctorParameters property in my component compiled js 
file. The missing of this property raise a error *Error: Can't resolve all 
parameters for LoadingComponent: (?).* I tried to find in the changelog and 
commits between like versions and I could not find the reason for the 
change, could someone explain the reason or help me find?

And this is the code compiled before new versions using ngc:

import { Component, HostBinding } from '@angular/core';
import { LoadingService } from './loading.service';
var LoadingComponent = /** @class */ (function () {
    function LoadingComponent(loadingService, http) {
        var _this = this;
        this.loadingService = loadingService;
        this.elementClass = false;
        this.loadingService.isVisible.subscribe(function (isVisible) {
            _this.elementClass = isVisible;
        });
    }
    LoadingComponent.decorators = [
        { type: Component, args: [{
                    selector: 'app-loading',
                    template: require('./loading.component.html'),
                    styles: [require('./loading.component.css')]
                },] },
    ];
    /** @nocollapse */
    LoadingComponent.ctorParameters = function () { return [
        { type: LoadingService, }
    ]; };
    LoadingComponent.propDecorators = {
        'elementClass': [{ type: HostBinding, args: ['class.visible',] },],
    };
    return LoadingComponent;
}());
export { LoadingComponent };
//# sourceMappingURL=loading.component.js.map

And this is after:



var __decorate = (this && this.__decorate) || function (decorators, target, 
key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = 
Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === 
"function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators
[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component, HostBinding } from '@angular/core';
var LoadingComponent = (function () {
    function LoadingComponent(loadingService) {
        var _this = this;
        this.loadingService = loadingService;
        this.elementClass = false;
        this.loadingService.isVisible.subscribe(function (isVisible) {
            _this.elementClass = isVisible;
        });
    }
    return LoadingComponent;
}());
__decorate([
    HostBinding('class.visible')
], LoadingComponent.prototype, "elementClass", void 0);
LoadingComponent = __decorate([
    Component({
        selector: 'app-loading',
        template: require('./loading.component.html'),
        styles: [require('./loading.component.css')]
    })
], LoadingComponent);
export { LoadingComponent };
//# sourceMappingURL=loading.component.js.map

Someone can help find who build this code or understand the best approach 
to solve this and if is better use the new generated style?

-- 
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.

Reply via email to