Java Reference
In-Depth Information
<footer>
<p class="text-muted">&copy; Packt Publishing
2014</p>
</footer>
</div>
<script src="webjars/angularjs/1.3.0-rc.1/
angular.js"></script>
<script src="webjars/angularjs/1.3.0-rc.1/
angular-resource.js"></script>
<script src="webjars/angularjs/1.3.0-rc.1/
angular-route.js"></script>
<script src="webjars/angular-ui-bootstrap/0.11.0/
ui-bootstrap-tpls.js"></script>
<script src="scripts/app.js"></script>
<script src="scripts/controllers/seat.js"></script>
<script src="scripts/services/seatservice.js"></script>
<script src="scripts/services/accountservice.js"></script>
</body>
</html>
You may have also noticed two strange-looking attributes in the html tags: ng-app and
ng-controller . These are AngularJS directives that point to the web page being an
AngularJS application, and that the container div will use a SeatCtrl controller.
Now, we will need the following files placed in our scripts directory. The first one is
the initialization file app.js :
'use strict';
angular.module('ticketApp', [ 'ngResource', 'ngRoute',
'ui.bootstrap' ])
.config(function ($routeProvider) {
$routeProvider.when('/', {
controller: 'SeatCtrl'
}).otherwise({
redirectTo: '/'
});
});
Search WWH ::




Custom Search