angular.module 引入新的module: 1. 在index.html中需要引入必须的js文件2. app.js:
angular.module(‘starter‘, [‘ionic‘,‘starter.controllers‘])
controllers.js:
1 angular.module(‘starter.controllers‘,[]) 2 .controller(‘testCtrl‘,function ($scope,$state,$ionicPopup,$stateParams) { 3 ...
index.html:
1 <head> 2 ... 3 <script src="js/app.js"></script> 4 <script src="js/controllers.js"></script> 5 <script type="js/mvc.js"></script> 6 ... 7 </head>
时间: 2024-10-13 23:47:48