-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grunt tests pass app still doesn't work (rest service...)
- Loading branch information
Showing
8 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ dist | |
.tmp | ||
.sass-cache | ||
app/bower_components | ||
angularjs_frontend.sublime-project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
'use strict'; | ||
|
||
angular.module('ngdemoApp.main', []) | ||
.controller('MainCtrl', function ($scope) { | ||
$scope.awesomeThings = [ | ||
'HTML5 Boilerplate', | ||
'AngularJS', | ||
'Karma' | ||
]; | ||
}); | ||
angular.module('ngdemoApp.mainCtrl', []) | ||
.controller('MainCtrl', function ($scope) { | ||
$scope.awesomeThings = [ | ||
'HTML5 Boilerplate', | ||
'AngularJS', | ||
'Karma' | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
'use strict'; | ||
|
||
var srv = angular.module('ngdemoApp.service', ['ngResource']); | ||
var srv = angular.module('ngdemoApp.factory', ['ngResource']); | ||
|
||
srv.factory('dummyFactory', function ($resource) { | ||
return $resource('http://localhost\\:8080/ngdemo/web/dummy', {}, { | ||
return $resource('http://localhost\\:8080/ngdemo/web/dummy', {}, { | ||
query: { method: 'GET', params: {} } | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
|
||
describe('Controller: DummyCtrl', function () { | ||
|
||
// TODO! The tested module ('dummyCtrl') has a dependency on the module 'dummyFactory'. | ||
// Since I don't know how to inject mocked dependencies using karma/jasmin | ||
// yet, I'll bootstrap the complete application by loading the 'ngdemoApp' module... | ||
beforeEach(module('ngdemoApp')); | ||
|
||
// load the controller's module | ||
beforeEach(module('ngdemoApp.dummyCtrl')); | ||
|
||
var DummyCtrl, | ||
scope; | ||
|
||
// Initialize the controller and a mock scope | ||
beforeEach(inject(function ($controller, $rootScope) { | ||
scope = $rootScope.$new(); | ||
DummyCtrl = $controller('DummyCtrl', { | ||
$scope: scope | ||
}); | ||
})); | ||
|
||
it('should attach a bla string to the scope', function () { | ||
expect(scope.bla).toBe('bla from controller'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters