Im trying to create a custom propertyEditor in which I want to load different html templates based on what link is clicked by the user.
I have been reading some articles about how to achieve this with Angular and the articles mentioned using $route service. This is what I have come up with :-
So the idea is if the user clicks the link, it should load the template mentioned above in the div containing ng-view.
However everytime I go to view the content node which contains this custom propertyEditor it doesnt load. It doesnt load even before clicking the link, so im guessing the issue could be the ng-view. When I remove ng-view, it loads but obviously the template wont display when clicking on the link.
Can anyone help or advice on another method to achieve this.
Using ng-view in custom propertyEditor
Hi guys,
Im trying to create a custom propertyEditor in which I want to load different html templates based on what link is clicked by the user.
I have been reading some articles about how to achieve this with Angular and the articles mentioned using $route service. This is what I have come up with :-
I found out that in order to inject that template into my main propertyEditor html file I should use the ng-view attribute
So the idea is if the user clicks the link, it should load the template mentioned above in the div containing ng-view.
However everytime I go to view the content node which contains this custom propertyEditor it doesnt load. It doesnt load even before clicking the link, so im guessing the issue could be the ng-view. When I remove ng-view, it loads but obviously the template wont display when clicking on the link.
Can anyone help or advice on another method to achieve this.
Thank you
I think you need to use ng-include instead of ng-view. Ng-view is tied to the routing and that can mess up the innerworking of the backend.
See https://code.angularjs.org/1.1.5/docs/api/ng.directive:ngInclude
Dave
@Dave
Great, thank you for the info and quick response.
:)
is working on a reply...