Commit | Line | Data |
---|---|---|
b3acfd03 TO |
1 | (function(angular, $, _) { |
2 | ||
3 | var resourceUrl = CRM.resourceUrls['org.civicrm.angularex']; | |
ad7abea2 | 4 | var example = angular.module('example', ['ngRoute', 'crmResource']); |
b3acfd03 TO |
5 | |
6 | example.config(['$routeProvider', | |
7 | function($routeProvider) { | |
8 | $routeProvider.when('/example', { | |
ad7abea2 | 9 | templateUrl: '~/example/example.html', |
b3acfd03 TO |
10 | controller: 'ExampleCtrl' |
11 | }); | |
12 | } | |
13 | ]); | |
14 | ||
15 | example.controller('ExampleCtrl', function($scope) { | |
16 | $scope.name = 'world'; | |
ad7abea2 | 17 | $scope.ts = CRM.ts('org.civicrm.angularex'); |
b3acfd03 TO |
18 | }); |
19 | ||
20 | })(angular, CRM.$, CRM._); |