Docs
Docs

Generators

📘

Use snake_case for multiple words (e.g.: add_items)

📘

Do not append the word Service, Controller or Ctrl. They will be automatically generated for you.

Below is a list of the available generators:

artisan ng:feature {settings}

Creates a new feature in /angular/app/ by generating the following:

  • angular/app/settings/settings.html
  • angular/app/settings/settings.controller.js
  • angular/app/settings/settings.less

with a sample SettingsCtrl in settings.js.

artisan ng:directive {user_profile}

Creates a new feature in /angular/directives/ by generating the following:

  • angular/directives/user_profile/user_profile.html
  • angular/directives/user_profile/user_profile.directive.js
  • angular/directives/user_profile/user_profile.less

with a sample directive for user-profile in user_profile.directive.js.

artisan ng:dialog {login}

Creates a new dialog in /angular/dialogs/ by generating the following:

  • angular/dialogs/login/login.html
  • angular/dialogs/login/login.dialog.js
  • angular/dialogs/login/login.less

with a sample LoginCtrl in login.dialog.js.

artisan ng:service {cache}

Creates a new service in /angular/services/ by generating the following:

  • angular/services/cache.service.js

with a sample CacheService.

artisan ng:filter {ucfirst}

Creates a new service in /angular/filters/ by generating the following:

  • angular/filters/ucfirst.filter.js

with a sample ucfirst filter.

artisan ng:config {http}

Creates a new service in /angular/config/ by generating the following:

  • angular/config/http.config.js

with a sample config in ucfirst.filter.js.