mardi 3 mai 2016

routable modal in ember using ember modal dialog

I want to create the routable modal.For that I understand that I have to create nested route inside a parent routes to work.Something Like this.

Router.map(function() {
  this.route('posts', { path: '/' }, function() {
    this.route('show', { path: '/posts/:post_id' });
  })

In this "show" route is routable modal and when user move to post/id it open a modal.This is cool and I am able to do it.The problem I am facing is I have component top-Navbar which is static and contains a icon for notification dropdown.The dropdown contains option which should open a modal box to show the image.It is exactly similar to fb notification.Now I have given a action for opening image modal.This is working fine.But when right clicks and try to open the image modal it gets screwed up.I can solve this by using routable modal.Now I have three routes present in

Router.js

Router.map(function() {
  this.route('myprofile',{path:'/mystudio'});
  this.route("usrprofile",{path:'/usrprofile/:id'});
  this.route("feed",path:'/feed'})
});

Now I can create a new route for image modal.But in this it will leave the current route and move to specified route.Which I don't want.It should Open in the current route and when user does a right click it should move to specified routes and open a modal dialog box.I want the features to exactly like facebook.How should I attain this.Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire