Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Commit 970d7fd

Browse files
committed
style(controller): apply style guide
1 parent 41d1c18 commit 970d7fd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/controller.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
(function() {
22
'use strict';
33

4+
angular.module('myApp', [])
5+
.controller('SampleController', SampleController);
6+
47
function SampleController($scope) {
58
var vm = this;
69

10+
vm.bar = bar;
11+
vm.doSomething = doSomething;
712
vm.foo = 'bar';
813

9-
vm.bar = function() {
14+
function bar() {
1015
vm.foo = 'baz';
11-
};
16+
}
1217

13-
vm.doSomething = function() {};
18+
function doSomething() {}
1419

1520
$scope.$watch('baz', function(newVal) {
1621
if (newVal) {
@@ -27,7 +32,4 @@
2732
//scope.$on()
2833
//scope.$apply()
2934
}
30-
31-
angular.module('myApp', [])
32-
.controller('SampleController', SampleController);
3335
}());

0 commit comments

Comments
 (0)