Run the below from terminal with Admin Rights You can open your terminal in admin mode by searching for it then right clicking on command prompt and open as administrator
->ng new AppName
->Add SCSS (I was informed it's the convention with angular)
->cd AppName
->ng add @angular/material
->Setup Hammer JS for gesture recognition
:YES
->Set up browser animations for Angular Material
:Yes
->npm install
->ng serve
When making a route you can set a null-able parameter, this will save you in terms of routing like doing an if, and if the parameter is there or not you can then perform your actions based on those parameter rules.
-------------------------------------- To create your model and controller together you can do this. Method 1 : Does not set controllers as resource items. php artisan make:controller CustomersController --model=Customer
Method 2 : Sets controllers as resource items. php artisan make:model Todo -mcr
-------------------------------------- -m, --migration Create a new migration file for the model. -c, --controller Create a new controller for the model. -r, --resource Indicates if the generated controller should be a resource controller
-------------------------------------- For reference sake this is the method where you manually create each method for Model and Controller
The --resource sets up by default the controllers crud functionalities
Inside your Controller in this case it's the Movies Controller. The action Result below is Index so on other words the Home of the Movies Controller. In this action there's two IF statements. If you load this controller-> Index it will return this pageIndex=1$sortBy=Name
public ActionResult Index(int? pageIndex, string sortBy){
if(!pageIndex.HasValue)
pageIndex = 1;
if (String.IsNullOrWhiteSpace(sortBy))
sortBy = "Name";
return Content(String.Format("pageIndex={0}$sortBy={1}", pageIndex, sortBy));
}