.net core - Working with imports with split app modules in Angular(4) (client, server, shared) -


i created .net spa application angular front end using yeoman generator. creates app 3 app.module.ts files (app.module.client.ts, app.module.shared.ts, app.module.server.ts). unfortunately ngmodule imports located in client app module file not seem injected components. when try use ngfor on input given error "can't bind 'ngmodel' since isn't known property of 'input'." think because forms module not being imported though app.module.client.ts file looks this: import { ngmodule } '@angular/core';

import { browsermodule } '@angular/platform-browser'; import { formsmodule } '@angular/forms'; import { httpmodule } '@angular/http'; import { sharedconfig } './app.module.shared'; import {selectmodule} 'ng2-select';      @ngmodule({         bootstrap: sharedconfig.bootstrap,         declarations: sharedconfig.declarations,         imports: [             browsermodule,             formsmodule,             httpmodule,             selectmodule,             ...sharedconfig.imports         ],         providers: [             { provide: 'origin_url', usevalue: location.origin }         ]     })     export class appmodule {     } 

perhaps i'm missing on how these divided modules work. how import modules given different module architecture?

update: able solve problem including module imports in app.module.server.ts well. want leave question open , can explain how works. it's strange since prebuilt template yeoman has module imports in app.module.client.ts file , seem impotent when running website dotnet run had duplicated in server file well.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -