Skip to content
Eric M. Dantas edited this page Apr 10, 2017 · 12 revisions

Boilerplate

# creates the boilerplate by answering some questions

$ ngf

Simple file creator

Component
 # creates a new component called car_cmp

 $ ngf g component car_cmp --feat car
Directive
 # creates a new directive called on_car_created

 $ ngf g directive on_car_created --feat car
Model
 # creates a new model called car

 $ ngf g model car --feat car
Factory
 # creates a new factory called carFactory

 $ ngf g factory carFactory --feat car
Service
 # creates a new service called carService

 $ ngf g service carFactory --feat car
Module
 # creates a new module called car

 $ ngf g module car --feat car
Resource
 # creates a new resource called carResource

 $ ngf g resource carResource --feat car
View
 # creates a new view called carView

 $ ngf g resource carView --feat car
Style
 # creates a new style called carStyle

 $ ngf g style carStyle --feat car
Controller
 # creates a new controller called car_controller

 $ ngf g controller car_controller --feat car
Controller
 # creates a new decorator called car_decorator

 $ ngf g decorator car_decorator --feat car
Filter
 # creates a new filter called new_car_filter

 $ ngf g filter new_car_filter --feat car
Pipe
 # creates a new filter called new_car_pipe

 $ ngf g pipe new_car_pipe --feat car
Endpoint
 # creates a new endpoint called car

 $ ngf g endpoint car --feat car

Multiple file creator

# creates new components called p1cmp, p2cmp, and p3cmp, 

$ ngf g cmp [p1cmp,p2cmp,p3cmp] --ft school
# creates a new component, model and service called professor

$ ngf g [cmp,mde,svc] professor --ft school
# creates a new component, model and service for the professor type (different suffixes)

$ ngf g [cmp,mde,svc] [professor_cmp,_professor_model,professor_service] --ft school
Clone this wiki locally