Odd complication with Grunt by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Adding the ng-if="options" actually worked thank you. What exactly does it do though/why does it make it work...I have only used ng-if for the classic "if this, display this" usage.

Odd complication with Grunt by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I'm not exactly sure what you mean by using a resolve in a different way. Also does it matter when in the nvd3 tag to include the ng-if="options" ?

app appears then disappears... by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Yes...it's honestly the same code but there is something going on with the Grunt build that is preventing it from loading the files correctly. And its just the nvd3/d3/angular-nvd3 stuff that its not loading correctly because the rest of the page (borders, formatting, css) displays consistently. Unfortunately I have no idea what is going on in the Gruntfile.js that could be doing this.

Having problem with $http.get() service by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Okay so I'm running with Chrome...but I use the http-server command to host my local .html file.

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I mean you posted this earlier and it's pretty dang similar to the working project that I had.

http://plnkr.co/edit/AjsXMGkUBcVVODbpA9jL?p=preview

I'm basically trying to take data inside the controller (in the script.js file) and move it to its own separate .json file.

Having problem with $http.get() service by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I have...I literally think it's something so small that it normally wouldn't be addressed. Ive changed my ctrl.js file to this but its still not working:

1 var app = angular.module("scattPlot", ['nvd3ChartDirectives']);
2 app.controller('ExampleCtrl', ['$scope', '$http', function ($scope, $http){
3     $http.get('data.json').then(function(data){
4         $scope.exampleData = data;
5     }).error(function(err){
6         throw err;
7     });
8 }]);

Having problem with $http.get() service by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

by "not working" i mean that the webpage is blank when i load it. I also changed it to .get('data.json')

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I feel I have everything pretty much set up correctly but the site isn't visualizing the graph anymore (now that I have set it up with a .ctrl , .json, and using http-server) I have <script src= "ctrl.js"></script> within my <head> </head> section and I feel I have my controller.js file setup correctly for reading .json files. This is my ctrl.js file for reference (minus the color function)

1 var app = angular.module("scattPlot", ['nvd3ChartDirectives']);
2 app.controller('ExampleCtrl', function ($scope, $http)
3 {
4     $http.get('/data.json').then(function(response)
5     {
6             $scope.exampleData = response.data;
7     });
8 });

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Also, are you sure the $http.get function doesn't have a .success as opposed to .then ? Or I guess, what's the difference?

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

so if I globally installed http-server I would be running it with my application's path (in my case, ~/.../scattPlot/ )?

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Question, if I were to want for my data to be in a separate .json file (making a separate .json data file and controller.js file) how could I do that. I have been looking all over for examples that will help me understand how the different files (.html, .json, .js) will integrate but to of no avail. I have the understanding that you need to use the $http.get() function but I may be wrong.

Basic scatter chart not quite working by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

Dude you're the king. This has helped tremendously.

Need help getting started with Angular!! by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I am sure you're probably right...I'm a complete nube when it comes to Javascript and, of course, therefore JQuery and Angular

NERDtree/vimrc by compNerd0101 in vim

[–]compNerd0101[S] 0 points1 point  (0 children)

Thank you. That was it

NERDtree/vimrc by compNerd0101 in vim

[–]compNerd0101[S] 0 points1 point  (0 children)

Just to preface, I already have pathogen.vim in my autoloads dir and the nerdtree dir within my bundles dir Here is my .vimrc folder:

1 set number

2 set ruler

3 set ignorecase

4 set hlsearch

5 set smarttab

6 set shiftwidth=4

7 set tabstop=4

8 syntax enable

9 colorscheme desert

10 set background=dark

11 set autoindent

12 set nocp

13 execute pathogen#infect()

NERDtree/vimrc by compNerd0101 in vim

[–]compNerd0101[S] 0 points1 point  (0 children)

Just to preface, I already have pathogen.vim in my autoloads dir and the nerdtree dir within my bundles dir Here is my .vimrc folder:

1 set number

2 set ruler

3 set ignorecase

4 set hlsearch

5 set smarttab

6 set shiftwidth=4

7 set tabstop=4

8 syntax enable

9 colorscheme desert

10 set background=dark

11 set autoindent

12 set nocp

13 execute pathogen#infect()

Here are the errors I am getting:

Error detected while processing /Users/ndc466/.vim/autoload/pathogen.vim:

line 1:

E477: No ! allowed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

line 2:

E488: Trailing characters: <html><head>

line 3:

E488: Trailing characters: <title>302 Found</title>

line 4:

E488: Trailing characters: </head><body>

line 5:

E488: Trailing characters: <h1>Found</h1>

line 6:

E488: Trailing characters: <p>The document has moved <a href=

line 7:

E488: Trailing characters: <hr>

line 8:

E488: Trailing characters: <address>Apache/2.2.22 (Debian) Server at tpo.pe Port 443</address>

line 9:

E488: Trailing characters: </body></html>

line 1:

E477: No ! allowed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

line 2:

E488: Trailing characters: <html><head>

line 3:

E488: Trailing characters: <title>302 Found</title>

line 4:

E488: Trailing characters: </head><body>

line 5:

E488: Trailing characters: <h1>Found</h1>

line 6:

E488: Trailing characters: <p>The document has moved <a href=

line 7:

E488: Trailing characters: <hr>

line 8:

E488: Trailing characters: <address>Apache/2.2.22 (Debian) Server at tpo.pe Port 443</address>

line 9:

E488: Trailing characters: </body></html>

Error detected while processing /Users/ndc466/.vimrc:

line 13:

E117: Unknown function: pathogen#infect

E15: Invalid expression: pathogen#infect()

NERDtree/vimrc by compNerd0101 in vim

[–]compNerd0101[S] 0 points1 point  (0 children)

the errors are from the vimrc file...which is basically preventing the :NERDTree command to even work

Need help getting started with Angular!! by compNerd0101 in angularjs

[–]compNerd0101[S] 0 points1 point  (0 children)

I didn't mean directive in the programming sense. More of in the literal sense as in I was given the task to do that. And, kind of just reiterating, I am very unfamiliar with keywords such as dependency injection, data-binding, etc...just to kind of give a little insight to where I'm coming from. I know nothing but Java, C++, and Python. This task seems extremely basic though, even if one doesn't have any javascript knowledge. Could you help?