router第二種寫法: (2).簡易寫法:若沒有傳遞id參數(:id),或沒讀取外部檔案(但有controller) var app = angular.module("myApp", ["ionic"]); var varemail, vartel, varheight, varsex; app.config(function($stateProvider,$urlRouterProvider) { $stateProvider .state("home", { templateUrl: "home.html" }) .state("email", { templateUrl: "email.html", controller: 'tab1Controlleremail' }) .state("arrange", { templateUrl: "arrange.html", controller: 'tab1Controllerarrange' }); }) app.controller("show01", function ($scope, $state) { $state.go("home"); }); app.controller('tab1Controlleremail', function ($scope) { $scope.btnemai = function (r1) { varemail = r1; }; }); app.controller('tab1Controllerarrange', function ($scope) { $scope.youremail = varemail; })

功能表

首頁
****連結到某個內聯網頁list.html的方法:ui-sref="list"