You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generating a component appends new code a few characters too early in module #9560
ng CLI version: 1.6.5
ng version: 5.2.1
node version: 8.9.4
npm version: 5.6.0
Windows 10 v.1703 build 15063.850
Repro steps
Step 1: Run Command: ng g c path/component-name
Step 2: Navigate to app.module.ts
Step 3: Observe new import statement path errors and NgModule declarations array errors
Observed behavior
import { ExistingComponent } from './path/existing.componen; <-- cut off the last two characters
import { NewComponent } from './path/subfolder/new/new.component't'; <--and added them here
@NgModule({
...
declarations: [
...
ExistingCompone, <-- cut off the last two characters
NewComponentnt, <-- and again added them here
]
...
})
This seems to be related to #9712, but I am getting this issue only if I change the encoding of the file where the module is defined. Keeping the original encoding (which Notepad++ can't detect) it works just fine.
Activity
dushkostanoeski commentedon Feb 23, 2018
This seems to be related to #9712, but I am getting this issue only if I change the encoding of the file where the module is defined. Keeping the original encoding (which Notepad++ can't detect) it works just fine.
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.