22 Mart 2021 Pazartesi

Angular General Project Requirements

Multiple applications in same project.
Material or Bootstrap layouting support.
i18n multi-language support for static resources.
A well designed folder structure for components, services, etc.
Authentication/authorization support with oidc client.

Create empty project
ng new AppName --createApplication=false --directory=AppName --interactive=false

Add project
ng generate application ProjectName --style=scss --routing=true

 

6 Mart 2021 Cumartesi

Best Practices

Yeni bir font nasıl eklerim?

Angular kendisi de dahil olmak üzere font'ları index.html dosyasından ekliyor. Yeni proje oluşturduğunuzda font import'u ve material icon'ları için link tanımlamasını index.html'de görebilirsiniz.

Örnek routing tanımlaması

const routes: Routes = [
  { path: '', redirectTo: '/designer', pathMatch: 'full' },
  { path: 'login', component: LoginComponent },
  { path: 'dashboard', component: DashboardComponent },
  { path: 'designer', component: DesignerComponent },
  { path: 'logout', component: LogoutComponent }
];