1

I'm using the Angular Leaflet Directive and want to dynamically populate the pop up content.

To populate the content, you can assign an html string to a property called "messages". Example shown here.

I want to use a directive templateUrl to create the dynamic content, convert it to an HTML string and assign it to the messages property in the controller.

I accomplished this but my solution seems overly complex to me. Is there a better way?

See my plunkr solution here.

2 Answers 2

1

I've found a solution for your question here. https://github.com/tombatossals/angular-leaflet-directive/issues/238 Using ng-include in the popup content.

Sign up to request clarification or add additional context in comments.

Comments

0

FYI I decided to ditch the idea of a dynamically populated popup message and will be routing to a separate view which will slide up on a click event.

I'll be using nested views with angular-ui router

Examples of Leaflet events with angular directive.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.