169 похожих чатов

What should I import? Import modules whose public (exported) declarable classes

you need to reference in this module's component templates.

This always means importing CommonModule from @angular/common for access to the Angular directives such as NgIf and NgFor. You can import it directly or from another module that re-exports it.

Import FormsModule from @angular/forms if your components have [(ngModel)] two-way binding expressions.

Import shared and feature modules when this module's components incorporate their components, directives, and pipes.

Import only BrowserModule in the root AppModule.

Should I import BrowserModule or CommonModule?

The root application module (AppModule) of almost every browser application should import BrowserModule from @angular/platform-browser.

BrowserModule provides services that are essential to launch and run a browser app.

BrowserModule also re-exports CommonModule from @angular/common, which means that components in the AppModule module also have access to the Angular directives every app needs, such as NgIf and NgFor.

Do not import BrowserModule in any other module. Feature modules and lazy-loaded modules should import CommonModule instead. They need the common directives. They don't need to re-install the app-wide providers.

1 ответов

4 просмотра

вроде да? browsermodule импортирую в appmodule, в остальных commonmodule и formsmodule

Похожие вопросы

Обсуждают сегодня

type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
48
А чем вам питонисты не угодили?😂
.
79
Можно ли загрузить скрипт py в бота чтобы он работал по нему? как это сделать?
huskadam #RCC Фанат? @hitlerpvp
13
Всем здравствуйте! Я хотел узнать сколько стоит средняя месячная зарплата у Electron js разработчиков? Мне очень это важно и нужно, плиз помогите узнать эту инфу! Для Джунио...
U.K.
10
А дин типизация это хорошо или плохо?
Alexey
12
Исходники плюс документация? Вы гоните)) демок хватит всем
zamtmn
11
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
77
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Hello. Could you please help me with finding all coordinates within a radius using a spatial index, given that I have a table with coordinates? SET @lng = 37.57925; SET @lat ...
Rinchin G
7
Карта сайта