I am trying to load a controller so that my view will display .Actualy I write my controller .Route or config also .But I am not able to load my controller and route file how to load controller using require js so that my login.html page is display ?
here is my plunker
http://plnkr.co/edit/DlI7CikKCL1cW5XGepGF?p=preview main.js
requirejs.config({
paths: {
ionic:'http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.min',
},
shim: {
ionic : {exports : 'ionic'}
}
});
route.js /*global define, require */
define(['app'], function (app) {
'use strict';
app.config(['$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('login', {
url: "/login",
templateUrl: "login.html",
controller: 'LoginCtrl'
})
$urlRouterProvider.otherwise("/login");
}]);
});
ANY guss how to load view