Questions tagged [angular2-modules]
132 questions
0
votes
1 answer
In Angular 2.4, failed to import a feature module from a different project to the main project
I have two projects, one is the main project and the second project is a shared project. Inside the shared project I have created a feature module called NavBar.
The reason why we separated into different projects is so that we can reuse the NavBar…

M. Dy
- 1
- 1
0
votes
0 answers
Angular 2: Where is the break in chain of modules?
I have a module that I'm calling home.module which I have routed into my app.module in the root folder. As things keep growing the home.module is becoming more massive. Naturally I went to create more modules to branch into it but for some reason…

Optiq
- 2,835
- 4
- 33
- 68
0
votes
2 answers
Working with layouts in Angular2 app
I have developed an Angular2 app using routing.
My problem scenario is:
I have a Login page which has different HTML and CSS.Once successfully logged in, I redirect to another page which has different HTML and CSS.
But I have index.html(login page)…

Jayakrishnan
- 4,232
- 2
- 23
- 35
0
votes
1 answer
angular2 router interpreting route as parameter?
I am trying to route to a child module with route params, my app.routes looks like
import { Routes, RouterModule } from '@angular/router';
const appRoutes: Routes = [
{ path: 'cell', loadChildren: './cell/cell.module#CellModule', pathMatch:…

George Edwards
- 8,979
- 20
- 78
- 161
0
votes
3 answers
How can I use a component that was defined in my core module from a lazy route?
I have a component that I would like to reuse in a few places throughout my applications. As such, I created a module within my core module with new component. The error I'm getting is 'foo' is not a known element.
You can see a demo here. You will…

onetwothree
- 672
- 1
- 10
- 20
0
votes
2 answers
Angular 2 call child selector from one child module into child module
I have a directory structure of:
|-resources
|-views
|-Typescript
|-App
|-app.module.ts
|-app.component.ts
|-Modules
|-Core
|-Assets
|-Typescript
|-core.module.ts
…

PaladiN
- 4,625
- 8
- 41
- 66
0
votes
1 answer
One Service with variable in many ngModule
It's not really a problem but it's a question :
In a test project, I try to use ng2-translate in multiple ngModule with a same TranslateService.
package.json :
"ng2-translate": "^4.0.0"
It's not working, for every module I must to declare a new…

Eltron
- 45
- 2
- 8
0
votes
1 answer
Multiple bundling for every ngModule with rollup.js Angular 2
I checked some articles about rollup.js and looks like it is pretty interesting module loader with cool bundle possibility. But, actually, I didn't see how it can be configured to multiple angular 2 modules bundling. For example: I have 10 modules…

Velidan
- 5,526
- 10
- 48
- 86
0
votes
1 answer
Angular 2 can't use custom directive
This is the shared module which I share across my app:
@NgModule({
imports: [
CommonModule,
ModalModule
],
declarations: [],
exports: [
ModalModule
]
})
export class SharedModule {}
This shared module imports…

Chrillewoodz
- 27,055
- 21
- 92
- 175
0
votes
0 answers
Why index.ts AND modules in Angular 2?
I get the concept of a barrel that let's you import a directory using the index.ts convention.
What I don't get is why the index.ts always seems to export * from the component.ts file.
Shouldn't it use the module.ts file to get all the…

mtyson
- 8,196
- 16
- 66
- 106
-1
votes
1 answer
ERROR in ./src/app/app.module.ts Module not found
I'm working on angular-cli. I got following errors.
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve '@angular/router/src/router_module' in
'E:\xampp\Angular-cli\Login\src\app'
@ ./src/app/app.module.ts 13:0-69
@…

Zeeshan Malik
- 627
- 1
- 14
- 31
-1
votes
2 answers
A Module in Angular (2+) should be an App by itself created with angular-cli?
I want to separate the login/register workflow into an isolated module. So far I created the module (ng g module login-module) and I want to add the Facebook and Google SDKs to it.
The thing is, the main module (AppModule) is the responsible for the…

forkfork
- 415
- 6
- 22