1、使用ng-route: app.js中的寫法: 需要導入angular-route.js: html中的寫法: 2、使用ui-router: 需要導入angular-ui-router.js(需要下載下傳):