Menu
  • HOME
  • TAGS

angular seed npm start

angularjs,angular-seed

Before you get too attached to angular-seed, you might want to check out this comparison of the alternatives and make an informed decision http://dancancro.com/comparison-of-angularjs-application-starters/...

Why isn't my $scope dependency resolved when I add it to the Angular Seed View1Ctrl

angularjs,angular-seed

if you use the [] you need to provide strings to match the dependency's to inject. .controller('View1Ctrl', ['$scope', function ($scope) { $scope.message = 'mundo'; }]); This is useful if you minify your javascript, .controller('View1Ctrl', ['$scope', function (a) { a.message = 'mundo'; }]); This means the $scope is injected as a...

cant get angular-animate to work

css,angularjs,angular-seed

When creating your angular app/module you will need to inject in ngAnimate angular.module('myApp', [ 'ngRoute', 'ngAnimate', // <-- this is the new line 'myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers' ]) ...

When adding scope to the Angular-Seed default View Controllers the test suite now fails

javascript,angularjs,karma-jasmine,angular-seed

in your test (view1_test.js) you need to inject $scope into the controller... describe('myApp.view1 module', function() { beforeEach(module('myApp.view1')); describe('view1 controller', function(){ it('should ....', inject(function($controller, $rootScope) { //spec body var $scope = $rootScope.$new(); var view1Ctrl = $controller('View1Ctrl', {$scope: $scope}); expect(view1Ctrl).toBeDefined(); })); }); }); ...