How to Create component and services in angularjs

Create Component —————-

here dashboard component will be created with folder dashboard.So inside Dashboard folder following files will be available src/app/dashboard/dashboard.component.html src/app/dashboard/dashboard.component.ts Service,Guards Creation —————- here authentication guard service is created using the following commands

it will generate the following two files inside services,guards folders src/app/services/authentication.ts src/app/guards/authentication.guard.ts

Angularjs error:has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

When i m trying to access nodejs api using angular its throwing this error Solution:

php artisan –version not working in laravel it throws error-In UrlGenerator.php line 111: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in

C:\xampp\htdocs\myproj>php artisan –version While executing this command it throws the below error. Solution: Normaly this issue will happen if the config files contains url(). Please remove all the url() related things from the config.php Or comment all the code and try the above command once more it will show properly. In UrlGenerator.php line 111: Argument… Read More »

Usage of SoftDelete in laravel 5.6

This is explained here using the below model,controller files EmpMaster.php


Datepicker jquery validation message not picker validation message using rules jquery.

Solution:use the $(this).valid() function in the date picker For example see the below code

Simple Example for Datatable display

Simple Example for Datatable display. If the html button not displaying in the view page use the escapeColumns([‘id’]) function return Datatables::of($result)->escapeColumns([‘id’])->make(true); Javascript File test.js

Php Files

view File mypage.php

Getting the error in laravel SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘updated_at’ in ‘field list’

Getting the error in laravel SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘updated_at’ in ‘field list’ (SQL: update emp_details set testID = 999, updated_at = 2018-09-03 14:50:09 where (testID = 1)) This error usually comes when the updated_at field missing in the laravel table.if the fields are not in the table in the database we… Read More »

Redirect to a url when the video playing ends using html5