Skip to content

Commit

Permalink
Merge pull request #92 from secourse2016/ionic-setup2
Browse files Browse the repository at this point in the history
The app is working fine
  • Loading branch information
EsraaaSalah committed Apr 29, 2016
2 parents b1459e5 + 6f32352 commit 3900bb2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 67 deletions.
4 changes: 2 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<!-- <script src="services/FlightSrv.js"></script>
<script src="controllers/flightBookingCtrl.js"></script> -->
<script src="services/FlightSrv.js"></script>
<script src="js/controllers/flightBookingCtrl.js"></script>
</head>

<body ng-app="starter">
Expand Down
10 changes: 5 additions & 5 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
App=angular.module('starter', ['ionic', 'starter.controllers']);
IonicApp=angular.module('starter', ['ionic']);

App.run(function($ionicPlatform) {
IonicApp.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
Expand All @@ -22,7 +22,7 @@ App.run(function($ionicPlatform) {
});
});

App.config(function($stateProvider, $urlRouterProvider) {
IonicApp.config(function($stateProvider, $urlRouterProvider) {
$stateProvider

.state('app', {
Expand All @@ -36,8 +36,8 @@ App.config(function($stateProvider, $urlRouterProvider) {
url: '/oneWayBooking',
views: {
'menuContent': {
templateUrl: 'templates/oneWayBooking.html'
/*controller: 'flightBookingCtrl'*/
templateUrl: 'templates/oneWayBooking.html',
controller: 'flightBookingCtrl'
}
}
})
Expand Down
10 changes: 5 additions & 5 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module('starter.controllers', [])
/*angular.module('starter.controllers', [])*/

.controller('AppCtrl', function($scope, $ionicModal, $timeout) {
IonicApp.controller('AppCtrl', function($scope, $ionicModal, $timeout) {

// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
Expand All @@ -22,7 +22,7 @@ angular.module('starter.controllers', [])

})

.controller('PlaylistsCtrl', function($scope) {
IonicApp.controller('PlaylistsCtrl', function($scope) {
$scope.playlists = [
{ title: 'Loay', id: 1 },
{ title: 'Mariam ', id: 2 },
Expand All @@ -32,12 +32,12 @@ angular.module('starter.controllers', [])
{ title: 'Rania :P', id: 6 }
];
})
.controller('SearchCtrl', function($scope) {
IonicApp.controller('SearchCtrl', function($scope) {




})

.controller('PlaylistCtrl', function($scope, $stateParams) {
IonicApp.controller('PlaylistCtrl', function($scope, $stateParams) {
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
App.controller('flightBookingCtrl', function($scope, FlightSrv, $location) {
IonicApp.controller('flightBookingCtrl', function($scope, FlightSrv,$location) {

$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
$scope.format = $scope.formats[1];
Expand Down Expand Up @@ -140,5 +140,6 @@ $scope.validateForm =function() {


}

AirportCodes();
});
2 changes: 1 addition & 1 deletion www/services/FlightSrv.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
App.factory('FlightSrv',function($http){
IonicApp.factory('FlightSrv',function($http){
return {
// returns all the flights in the json file
getInFlights : function(cb){
Expand Down
2 changes: 1 addition & 1 deletion www/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1 class="title">Left</h1>
Contact Us
</ion-item>
<ion-item menu-close href="#/app/ourteam">
Our Team
Our Team
</ion-item>
<ion-item menu-close href="#/app/welcomePage">
Home
Expand Down
52 changes: 0 additions & 52 deletions www/templates/roundTripBooking

This file was deleted.

0 comments on commit 3900bb2

Please sign in to comment.