diff --git a/src/Console/Commands/AngularComponent.php b/src/Console/Commands/AngularComponent.php index 15052f9..68a8ef7 100644 --- a/src/Console/Commands/AngularComponent.php +++ b/src/Console/Commands/AngularComponent.php @@ -40,7 +40,6 @@ public function handle() { $name = $this->argument('name'); $studly_name = studly_case($name); - $component_name = strtolower(substr($studly_name, 0, 1)).substr($studly_name, 1); $html = file_get_contents(__DIR__.'/Stubs/AngularComponent/component.html.stub'); $js = file_get_contents(__DIR__.'/Stubs/AngularComponent/component.js.stub'); @@ -48,7 +47,6 @@ public function handle() $js = str_replace('{{StudlyName}}', $studly_name, $js); $js = str_replace('{{name}}', $name, $js); - $js = str_replace('{{componentName}}', $component_name, $js); $folder = base_path(config('generators.source.root')).'/'.config('generators.source.components').'/'.$name; if (is_dir($folder)) { diff --git a/src/Console/Commands/Stubs/AngularComponent/component.js.stub b/src/Console/Commands/Stubs/AngularComponent/component.js.stub index b0444d0..c1751eb 100644 --- a/src/Console/Commands/Stubs/AngularComponent/component.js.stub +++ b/src/Console/Commands/Stubs/AngularComponent/component.js.stub @@ -6,7 +6,7 @@ class {{StudlyName}}Controller{ } } -export const {{componentName}}Component = { +export const {{StudlyName}}Component = { templateUrl: './views/app/components/{{name}}/{{name}}.component.html', controller: {{StudlyName}}Controller, controllerAs: 'vm',