0

I installed ngForce as discussed here by Kevin P

How to install ngForce?

it installed without any errors.

However, when I run the VisualForce samples, they don't give any output.

e.g. accessing ngforcedemo page gives following output on the left hand side:

Filter Opportunities By StageName
Show All
{{name.label}}

I think, it should give list of opportunities by stage name.

  • 2
    Have you checked your browser's developer tools "Network" tab to make sure everything loaded and its JavaScript console to check that there are no errors there? See e.g. http://salesforce.stackexchange.com/questions/36715/how-do-i-start-to-debug-my-own-visualforce-javascript. If you are going to use Angular, you will need to get used to using these tools as most of the code executes in the browser. – Keith C Apr 24 '15 at 16:18
  • 1
    thanks Keith.That should definitely have been my starting point. There are a tons of errors related to resources not found from the ngforce library. I will update the post if I am able to resolve them. There were no installation errors, so I am assuming that there are issues with the package I used. – Paresh J Apr 25 '15 at 16:53
  • @Kevin P do you have any suggestions? Can it be because I have a custom domain? I checked static resources and zip file seems to be alright there. – Paresh J Apr 25 '15 at 17:01
  • Many files which are part of the code as an includeScript are not in the ngForce zip file installed with the installation, so all of them are resulting in 404 e.g.: <apex:includeScript value="{!URLFOR($Resource.ngForce, 'ngForce/js/angular.min.1.1.5.js')}"/> <apex:includeScript value="{!URLFOR($Resource.ngForce, 'ngForce/js/angular-ui.min.js')}"/> <apex:includeScript value="{!URLFOR($Resource.ngForce, 'ngForce/js/ui-bootstrap-tpls-0.3.0.min.js')}"/> – Paresh J Apr 27 '15 at 13:21

3 Answers3

2

It seams that the demos in ngForce project still rely on a previous version of ngForce with embedded jQuery, Bootstrap, angularJS, etc, but the latest ngForce does not embed those libraries in the generated Salesforce static resources. Is that a correct evaluation?

Would the correct fix be to have the demo pages point to CDN versions of those libraries?

Accoring to the demo pages, there were also some custom javascript which may no longer exist in the project. Should those links just be removed?

Does anyone know if ngForce works with the latest versions of those libraries or does it require older versions?

D G Barnes
  • 31
  • 3
  • I believe you're on the right lines but answers shouldn't ask more questions. Best bet is to do some experimenting and then update this with concise info :) – Matt Lacey May 20 '16 at 00:36
2

The examples are out of date. I haven't had time to update them. If you're familiar with standard visualforce inclusion of files you should be able to update this without a probelm.

Kevin P
  • 7,208
  • 2
  • 27
  • 40
  • Thanks @Kevin P I managed to make ngForceDemo work by making some changes. However restapidemo is looking for <apex:includeScript value="{!URLFOR($Resource.ngForce, 'ngForce/controllers/restResourcesCtrl.js')}"/> which is not in the controllers directory at all. – Paresh J May 01 '15 at 18:51
0

Including the controller which Paresh mentioned, there seems to be several more custom files which are missing in the new version of ngForce. To me, it doesn't seem as simple as finding everything from an external source.

Reid Carlberg's Javascript Playground integrates a very old version of ngForce which works with the demo pages. Are there any examples anywhere of the current ngForce working?

D G Barnes
  • 31
  • 3