angularjs ng-grid cellTemplate file-referenced on .Net MVC - angularjs

anybody fights with a rebellious html file?
i.e. how to reference a file on ng-grid columnsDef CellTemplate .Net MVC directory structure? I have followed ng-grid site examples but I hadn't be able to make it work. If I put html code inside js file it works fine.
I'm trying to put the file everywhere but it doesn't find it.
Thanks in advance.

I will respond to myself.
After looking for cellTemplate inside ng-grid.js I saw that it was called to a get ajax function, then I thought that what I was needing was an Action in my MVC Controller that response the partial view I needed.
In cellTemplate property of my angular controller I only put the call to MVC Controller and 'voilĂ '... It works!!!

Related

Treeview in angular ui-grid

I am trying to get a tree view working in angular ui-grid. However I always get the error that the template for the treeViewRowHeader cannot be found.
In the example there is no such template and no call is made to the server for this template.
Anyone know where/how i should specify this template?
BTW: Using RC21
Sorry, stupid mistake in using the wrong css file for angular grid.

ngInclude using AngularJS and JavaFX

The problem I want to solve is how to inject a separate html file into the main one in JavaFX Webview + AngularJS. I tried to use AngularJS ngInclude, but maybe there is a better way to achieve it? Ater debugging AngularJS ng-include I failed due to unsupported jar:// protocolol. Is there any way to load html files using AngularJS framework and JavaFX? HTML files are inside the jar file and AngularJS is the framework. Should I turn away from one of them or there is some solution?
Details:
I load from index.html subpage1.html using nginclude dircetive. It works outside JavaFx but fails when I use Webview inside JavaFX.

Requiring a directive controller inside another directive

I am using Angular UI Bootstrap Datepicker. I want to add behavior to this component. According to this guide, Extending Directives, I proposed some changes to this component. Changes can be view there: GitHub PR #257.
So now, I am trying to require it inside my extension but Angular keep saying he can't find datepicker controller.
I read this thread on SO AngularJS directive controllers requiring parent directive controllers? in which the answer basically shows the same and it seems working, Fiddle.
I looked at the Angular version which is 1.0.3 in the Fiddle and I am using Angular 1.1.5.
Did this change in latest Angular version or am I doing it wrong?
According to the comments, indeed, it still works with AngularJS 1.1.5. And ended finding what was messing up. As I wanted to extend the core functionalities, I wanted to edit the original template so I used the templateUrl and provided a path to a custom template, which worked when stacking the directives but the same when requiring directives mess the things up.
Do you know how I can override original template in this context?

Changing pages in AngularJS (under requireJS)

I'm a beginner in AngularJs and I have a simple question: How do I change pages in AngularJS?
Not using router (ng-view) in AngularJS since I need a new html page where there's no common templates. I tried to use "ng-href" but it doesn't work well, since the system works under requireJS and the new html doesnt contain any js or css that I need. (except I force to add them..)
Does anyone has got some idea?
you can achieve with some template engine like "Swig" http://paularmstrong.github.io/swig/ with has a layout template were you base js and css and you can extend it.

Using 3rd Party Javascript in AngularJS Partials?

I've making use of AngularJS Partial templates to create a dashboard. There is a listing view and when you click on an item, it switches to an Items-Detail partial.
Inside the Items detail partial, I'd like to show some charts via RGraph. However, for the life of me, I can't figure out how to do this.
I can't seem to invoke javascript from inside the partial html. So I think I need to do it in the controller, or maybe create a directive?
I'm pretty new to AngularJS so my understanding is still very rudimentary and likely misguided.
AngularJS ("jqlite") doesn't support <script> tags inside partials.
Include jQuery on your page, however, and it should work. Note that jQuery must be included before AngularJS.
See also AngularJS: How to make angular load script inside ng-include?

Resources