We can use angular's $route service to define something like this: for the specific URL pointed to by the browser, angular will load and display a template and instantiate a controller to provide content to the template.
In the application, you can create routes by calling the functions on the $routeProvider service, and pass the routes you need to create to these functions as a configuration block. The pseudo-code is as follows:
The code copy is as follows:
var someModule = angular.module('somemodule',[...module dependencies...])
someModule.config(function($routeProvider){
$routeProvider.
when('url',{controller:aController,templateUrl:'/path/to/template'}).
When(...other...).
otherwise(...what to do ...);
});
The method is simple and the code is simple, but it is very practical. I hope you can like it.