Question: why I can't start the spinner?
See original GitHub issueI’ve been using a different “way” of creating controllers, so is not exactly as your example. I can’t get the spinner to start:
var myApp = angular.module('myApp', ['ngRoute', 'ui.bootstrap', 'toaster', 'angularSpinner']);
angular.module('myApp').controller('productsController', function($scope, $modal, $http, toaster, usSpinnerService) {
$scope.hey = "hey!";
usSpinnerService.spin('loading-products'); // <-- not working, no errors thrown though.
...
});
My view is as follows:
<h1>Products</h1>
{{hey}}
<span us-spinner="{radius:30, width:10, length: 16}" spinner-key="loading-products"></span>
“hey is correctly displayed” (just as a reference)
Am I bringing the usSpinnerService service in an incorrect manner? Thank you.
I though of asking this in stackoverflow but here you can also tag the issue as a question, right? sorry if not.
Issue Analytics
- State:
- Created 9 years ago
- Comments:16
Top Results From Across the Web
Having Trouble Getting You Wind Spinner To Spin? Try This
Start by holding the center point, then grabbing the outermost ring. Then, twist the outer ring until the decoration opens.
Read more >How to fix a fidget spinner that won't spin - YouTube
My aluminum tri- spinner ( http://amzn.to/2pteqdO ) just wouldn't spin for more than a few seconds. There was clearly a rub that was...
Read more >How Do You Fix a Fidget Spinner? - YouTube
Your fidget spinner might be rusty, wobbly, or simply just won't spin. Let's diagnose the problem and figure out how you can be...
Read more >Why i cannot select first choice of the spinner? - Stack Overflow
onItemSelected function will be called only when the user selects a different item in spinner than the currently selected item. For example :....
Read more >Wheel Decide
Can't decide? Wheel Decide for you! Set your own custom choices and then spin the wheel to make the random decision of lunch,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just had this issue as well. It’s because the
$broadcast
is firing before the$on
is ready. While it isn’t ideal, try wrapping your spin method in a timeout:Here is working solution! I just put us-spinner directive above ng-view
`
` and call in my controller
`
`