Primeiro commit do projeto Angular
This commit is contained in:
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';<% if (lazyRoute) { %>
|
||||
import { <%= classify(name) %> } from './<%= dasherize(name) %>';<% } %>
|
||||
|
||||
const routes: Routes = [<% if (lazyRoute) { %>{ path: '', component: <%= classify(name) %> }<% } %>];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.for<%= routingScope %>(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class <%= classify(name) %>RoutingModule { }
|
||||
Generated
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
import { NgModule } from '@angular/core';<% if (commonModule) { %>
|
||||
import { CommonModule } from '@angular/common';<% } %><% if (lazyRouteWithoutRouteModule) { %>
|
||||
import { Routes, RouterModule } from '@angular/router';<% } %>
|
||||
<% if ((!lazyRoute && routing) || lazyRouteWithRouteModule) { %>
|
||||
import { <%= classify(name) %>RoutingModule } from './<%= dasherize(name) %>-routing<%= typeSeparator %>module';<% } %>
|
||||
<% if (lazyRouteWithoutRouteModule) { %>
|
||||
const routes: Routes = [
|
||||
{ path: '', component: <%= classify(name) %> }
|
||||
];<% } %>
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [<% if (commonModule) { %>
|
||||
CommonModule<% } %><% if ((!lazyRoute && routing) || lazyRouteWithRouteModule) { %>,
|
||||
<%= classify(name) %>RoutingModule<% } %><% if (lazyRouteWithoutRouteModule) { %>,
|
||||
RouterModule.forChild(routes)<% } %>
|
||||
]
|
||||
})
|
||||
export class <%= classify(name) %>Module { }
|
||||
Reference in New Issue
Block a user