を状態から「状態」を解決できませんでした、私はこのコードを使用して別のページに移動しようとしていた。私はイオンに新しいです「」
HTMLのindex.htmlを:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="manifest" href="manifest.json">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="Humanity" ng-controller="main">
<div style="with:100%;">
<img src="img/loginlogo.png" style="display:block;margin:0 auto;">
</div> <br>
<div class="list">
<label class="item item-input item-floating-label">
<span class="input-label">Email</span>
<input type="text" placeholder="First Name">
</label>
<label class="item item-input item-floating-label">
<span class="input-label">Password</span>
<input type="text" placeholder="Last Name">
</label>
</div>
<button ng-click="test();" class="button button-block icon-right ion-chevron-right button-balanced" style="width:90%;display:block;margin:0 auto;">
Sign in
</button><br>
<button class="button button-block icon-right ion-chevron-right button-positive" style="width:90%;display:block;margin:0 auto;">
Register
</button>
</body>
</html>
JSアプリ。 js:
var app = angular.module('Humanity', ['ionic']);
app.controller('main', function ($scope,$state, $ionicModal, $location) {
var route = angular.module('route', ["ui.router"]);
app.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home1', {
url: "templates/home1",
templateUrl: "templates/test.html"
})
});
$scope.test = function() {
$state.go('home1');
};
});
私は問題をどこで知りませんか、検索しようとしましたが、実際の解決策は見つかりませんでした。私はインジェクターを確認したので、$場所を試しました。何も働いていません。
こんにちはあなたはテンプレートを注入することができる場所PURするのを忘れてたと思う..私..のように:あなたに依存 ...または他のタイプは(テンプレートとルーティング –