Questions tagged angular-module

Explore the latest questions and answers asked by our top developers.

angular load modules based on url

I am trying to create an angular application, with two modules. One for the user part and one for the admin part. I would like to load the module only if needed. For example if the requested url is /my-account it would load the user module. But if it’s something that starts with /admin it […]

Angular import modules on parent of per nested component

Using Angular 12, We have hotel component, and a hotel module -> this imports all the required components and modules for a hotel. Within the hotel component.html, we loop through all the rooms and display a ‘hotel-room.component’. Is it best practice (or performance issues?) to have a child ‘hotel-room.module’, and import only the required components […]

By Simon
Published
Categorized as angular, angular-module, typescript Tagged , ,

Class BrowserModule is not an Angular module

When I am creating a new angular project, it gives me error at imports in the ‘app.module.ts’ file. Code below: import { NgModule } from ‘@angular/core’; import {BrowserModule} from "@angular/platform-browser"; import { AppRoutingModule } from ‘./app-routing.module’; import { AppComponent } from ‘./app.component’; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, //error here AppRoutingModule ], providers: […]

Angular accessing parent parameter in nested modules

I am trying to divide an Angular 12 project into (lazyload) modules, but I’m running into a problem with accessing the route parameters in one of the child routes. I have the following (simplified) module structure: app.module | settings.module | core.module I have the following route for app.module: { path: ‘portfolio/:portfolio’, component: PortfolioComponent, canActivate: [AccessGuard], […]

Directive seems doesn’t imported

I think directive is not working. I want a create a tooltip so I create directive @Directive({ selector: ‘[tooltip]’, }) export class TooltipDirective { @Input() public title: string; @HostListener(‘mouseover’, [‘$event’]) public onMouseOver($event: MouseEvent): void { console.log("HOME") // it doesn’t print so I think the directive is not imported } } My tooltip.module.ts is @NgModule({ imports: […]

No provider for FormBuilder error although ReactiveFormsModule is imported in the feature module [closed]

I am using Angular 12. I have 2 modules in my application, the app module and a feature module I have created. The feature module is lazy loaded. I have created a component in the feature module and trying to use FormBuilder by injecting it in the components constructor. While running the application I am […]

angular quill dynamic config

I’m currently implementing the quill editor with quill-mention in an angular project. Quill-mention should use a specific http request from an implemented employee-service: QuillModule.forRoot({ modules: { mention: { allowedChars: /^[A-Za-zsÅÄÖåäö]*$/, mentionDenotationChars: ["@"], source: employeeService.getEmployees() } } }) The problem is how to inject this Service function into the QuillModule config. I allready tried to create […]

By dithomas01
Published
Categorized as angular, angular-module, ngx-quill, quill Tagged , , ,

Angular 12 – NgMaterialMultilevelMenuModule – Display problem

(Sorry in advance if the tags are bad) I’m trying to use the NgMaterialMultilevelMenuModule in order to do a multi-level menu (logic). I found tutorials but what ever I do, it shows nothing and after I call the module and it doesn’t show what is after in the html file (I only see "Menu"). I […]

By Amarillys
Published
Categorized as angular, angular-module Tagged ,

Setup Angular Core module – AngularModules

Well, I’m trying to setup an Angular Core Module. I already created the core module and inside the core module I created a Service called Dummy. src/app/core/dummy.service.ts import { Injectable } from ‘@angular/core’; @Injectable({ providedIn: ‘root’ }) export class DummyService { val = 1; constructor() { console.log(‘*** constructor DummyService’); } getNext(): number{ this.val++; return this.val; […]

By raj
Published
Categorized as angular, angular-module Tagged ,

Can search engines read the content of our component if we lazy load its module with ngx-loadable in Angular?

Can search engines read the content of our component if we lazy load its module with ng x-loadable in Angular? Source: Angular Questions

1 9

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq