-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for angularjs templates to ngeo-displaywindow #3801
Add support for angularjs templates to ngeo-displaywindow #3801
Conversation
examples/displaywindow.html
Outdated
content-template="::ctrl.window3Template" | ||
content-scope="::ctrl.windowScope" | ||
draggable="::true" | ||
resize="::true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If draggable AND resize are true
, that's the same as desktop=true
.
And by default, desktop is true
.
So you can remove both binding, that will be the same.
(read the doc :-p )
I think you can also remove height and width, that's not what we want to show (=noise).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Window2 has both as well... But I agree on leaving out stuff, we don't want to show. I will keep the width/height on the last one though, otherwise you need to resize the window first to see what I want to show.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but in windows 2 I want to demonstrate it.
But ok, you can let it.
examples/displaywindow.js
Outdated
* @type {string} | ||
* @export | ||
*/ | ||
this.window4TextBinding = 'This is an angular binding.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AngularJS
@@ -262,6 +299,8 @@ ngeo.message.displaywindowComponent.component('ngeoDisplaywindow', { | |||
bindings: { | |||
'clearOnClose': '<?', | |||
'content': '=?', | |||
'contentTemplate': '<', | |||
'contentScope': '<', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must add ?
symbol to the bindings otherwise it's a mandatory bindings and you will get errors with example's window 1 and 2.
Allows angularjs templates inside the popups of ngeo-displaywindow.
Example in action: https://geomapfish-demo.camptocamp.com/mkuenzli/displaywindow.html