Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown provider: nvd3Provider <- nvd3 <- clientDashBoardPageCtrl #761

Open
Hanwen196 opened this issue Feb 5, 2019 · 0 comments
Open

Comments

@Hanwen196
Copy link

Hi, I am trying to incorporate angular-nvd3. But it seems missing something. Can you give me a help?

It said "Unknown provider: nvd3Provider <- nvd3 <- clientDashBoardPageCtrl"

I am using angular 1.5x, and some essential code is below.

in my app.js

var myApp = angular.module('myApp',[/*'ngRoute',*/
                                    'ngAnimate',
                                    'ngResource',
                                    'ui.router',
                                    'nvd3']);

in the controller.js

myApp.controller('clientDashBoardPageCtrl', 
		
	['$scope', '$state',
		'emitEventNameService', 'urlService', 'nvd3',
         
	function($scope, $state,
	    emitEventNameService, urlService, nvd3,
		) {

in index.html

	<script src="node_modules/angular/angular.js"></script>
	<script src="node_modules/d3/d3.js"></script>
	<script src="node_modules/nvd3/build/nv.d3.js"></script> <!-- or use another assembly -->
	<script src="node_modules/angular-nvd3/dist/angular-nvd3.js"></script>
	<link rel="stylesheet" href="node_modules/nvd3/build/nv.d3.css">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant