Category : angular

I’m beginner in Angular and I have to do a search bar in Angular with api call. I use Laravel in Backend. This is my route for listing and searching: Route::group([‘prefix’=>’users’], function(){ Route::get(‘/{q?}’, [UserController::class, ‘index’]); So i use a get method to search. On angular, I did this to list my users in my app.component.ts: ..

Read more

I have: Angular version 11.0.5. Laravel version 8.18.1. For Canvas i used Fabricjs "fabric": "^4.3.1", "@types/fabric": "^4.2.2" For laravel CORS: I used "fruitcake/laravel-cors": "^2.0", Here is the Laravel configuaration: Kernal.php protected $middleware = [ FruitcakeCorsHandleCors::class, ]; protected $middlewareGroups = [ ‘web’ => [ ], ‘api’ => [ ‘throttle:api’, FruitcakeCorsHandleCors::class, ], ]; config/cors.php ‘paths’ => [‘api/*’, ..

Read more

I have one application named MyProject which OAuth credentials are: now I want to add login with my project in my second project. how can I do that because my second project is made in laravel as backend and angular and typescript as a front end? my first project is normal PHP. <a href="http://localhost/myproject/oauth.php?app_id=1234&&secret=5678">Login with ..

Read more

I am working Laravel 7 and Angular 10 separately. but in My new project I am going to working with both Laravel and Angular. I need install Angular to My Laravel and do My Javascript task using Angular. but I have following problems to solve 1.could I install Angular in my Laravel app? 2.Than, How ..

Read more

I’m building a web app that has an API first design using Laravel for the API Angular for the UI. I’ve integrated Outlook Calendar using the Microsoft OAuth flow into the Angular app using their tutorial (https://docs.microsoft.com/en-us/graph/tutorials/angular?tutorial-step=3) which is working such that I can correctly attain a list of the current user’s calendar events that ..

Read more

I am trying to upload image from angular(frontend) to laravel(backend). ANGULAR Project product.component.html <form [formGroup]="mediaFormGroup" (ngSubmit)="onSubmit();"> <input type="file" name="thumb_nail" (change)="onFileChange($event,’thumbnail’)" /> <button type="submit" >UPLOAD</button> </form> product.component.ts thumbFile: File; onFileChange(event, imgType) { this.thumbFile = <File>event.target.files[0]; } onSubmit(){ const formData = new FormData(); formData.append(‘thumbimage’, this.thumbFile); this.uploadService.upload(formData).subscribe( data => { return data; }); } upload.service.ts public upload(data) { ..

Read more

Tengo un form en angular que recoge toda la informacion y genera un objeto, paso la informacion por un http.post a la api. enter image description here Lo recojo en laravel atraves del model y pongo toda la informacion en el controller. enter image description here enter image description here enter image description here He ..

Read more

I can’t get my Angular App working to send a http request to my locally running laravel-api. In Postman it’s working perfectly, but I can’t get it working in Angular. This is the working post-request triggered by Postman. This is my Angular-logic: login(username: string, password: string): Observable<any> { let body = new FormData(); body.append(’email’, username); ..

Read more

500 (Internal Server Error) when I try to submit user data to laravel. Actually it stores data fine if I execute in laravel: User::create($request->all()) So it means the connection between client and server is alright. Angular @Component({ selector: ‘app-register’, templateUrl: ‘./register.component.html’, styleUrls: [‘./register.component.css’] }) export class RegisterComponent implements OnInit { form: FormGroup; constructor(private fb: FormBuilder, ..

Read more