angularjs - Copy div content to dynamically create a modal window:possible? -


in application displaying graphs using angular chart directives.

what i'd accomplish display small version of graphs in main page , then, pressing button, display bigger version of specific graph inside of popup window.

graphs populated @ run time, once small version of graph populated matter of changing size , copy canvas code inside of popup window, have no idea on how accomplish i'm asking help.

here's plunker "http://plnkr.co/edit/eajx7nqwhmu7obvi4u8b"

you need directive like:

app.directive('graph', [function() {     return {         restrict: 'a',         scope: {             x: '@',             y: '@',             width: '@',             height: '@'         },         template: '' // code draw graph.     }; }]); 

in way, can reuse directive in multiple place, changing parameters:

<div graph width="100" height="200"></div> <div graph width="500" height="1000"></div> ...... 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -