Я пытаюсь получить представление панели управления из папки шаблонов при загрузке моего приложения. Я использую работу Ionic frame.Угловая конфигурация url не работает с ионным каркасом
Моего индекса
<body ng-app="starter">
<ion-pane>
<ion-header-bar class="bar bar-header bar-dark main-header">
<h1 class="title main-header-title"><strong>Recharge Plans</strong></h1>
</ion-header-bar>
<ion-nav-view></ion-nav-view>
</ion-pane>
Моего app.js
angular.module('starter', ['ionic','starter.controller','starter.service'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('dash', {
url: '/dash',
views: {
'dash': {
templateUrl: '/templates/dash.html',
controller: 'DashCtrl'
}
}
});
$urlRouterProvider.otherwise('/dash');
});
Моего controller.js
angular.module('starter.controller',[])
.controller('DashCtrl', function($scope) {
alert("ok");
})
В 'www \ templates' У меня есть файл с именем dash.html.
Мой dash.html является
<ion-view ng-controller="DashCtrl">
<ion-content>
<div class="list searc-panel">
<label class="item item-input item-select">
<div class="input-label">
Select Operator
</div>
<select>
<option>Select</option>
<option>Airtel</option>
<option>Vodafone</option>
</select>
</label>
<label class="item item-input item-select">
<div class="input-label">
Select State
</div>
<select>
<option>Select</option>
<option>West bengal</option>
<option>Kolkata</option>
</select>
</label>
<button class="button button-full button-positive">
Search My Plans
</button>
</div>
</ion-content>
</ion-view>
Но когда я нажимаю 'файла: /// C: /Users/Sanjeev/RechargePlans/www/index.html' в браузере, то он оказывает мне 'file: /// C: /Users/Sanjeev/RechargePlans/www/index.html#/dash' с пустым представлением.
Что мне не хватает ???
любая ошибка консоли? – V31