mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-01 12:33:37 +08:00
chore(formating): clean code to be function() {
This commit is contained in:
@@ -8,11 +8,11 @@ angular.service('myApplication', function($resource){
|
||||
});
|
||||
}, {inject:['$resource']});
|
||||
|
||||
function BuzzController(){
|
||||
function BuzzController() {
|
||||
this.$watch('$location.hashPath', this.userChange);
|
||||
}
|
||||
BuzzController.prototype = {
|
||||
userChange: function(){
|
||||
userChange: function() {
|
||||
this.userId = this.$location.hashPath;
|
||||
this.activities = this.Activity.get({userId:this.userId});
|
||||
},
|
||||
@@ -22,7 +22,7 @@ BuzzController.prototype = {
|
||||
if (activity.replies) {
|
||||
activity.replies.show = !activity.replies.show;
|
||||
} else {
|
||||
activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id}, function(){
|
||||
activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id}, function() {
|
||||
activity.replies.show = true;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ describe('personal log', function() {
|
||||
});
|
||||
|
||||
|
||||
it('should create new logs and order them in reverse chronological order', function(){
|
||||
it('should create new logs and order them in reverse chronological order', function() {
|
||||
//create first msg
|
||||
input('newMsg').enter('my first message');
|
||||
element('form input[type="submit"]').click();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function noop(){}
|
||||
$(document).ready(function(){
|
||||
function noop() {}
|
||||
$(document).ready(function() {
|
||||
function xhr(method, url, data, callback){
|
||||
jQuery.getJSON(url, function(){
|
||||
jQuery.getJSON(url, function() {
|
||||
callback.apply(this, arguments);
|
||||
scope.updateView();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user