1

How does one use ui router to open a modal window without replacing the content of the "window" behind modal. I tried various ways of opening modal and had different results, depending how I set up the state. It would either remove the content behind, or open same content as it is in the background, or open new state in both modal and in the background. I followed this stackoverflow quiestion Angular UI-Router modal removes parent state approach with no success. This approach replaces both ui-views with new state. What I need it to open a modal with its own, how should I say, state that is severed from the rest of the application. Also, if I use query params, I have to add insuredId also as a parameter, even though parent url has that paramter, otherwise I get an error that it is missing.

Here is how I have the states configured. Don't worry about it looking a little bit different than what you are used seeing, it is just a leftover from regular router. States get collected and processed where "name" is passed as first arg, and "config" as second.

    {
           name: 'Insured',
           permissions: 'oView Insured Profile',
           config: {
                      url: '/insureds/:insuredId',
                      templateUrl: 'app/insured/inDefault.html'
                    }
        },
        {
            name: 'Insured.Edit',
            permissions: 'oEdit Primary Insured',
            config: {
                       url: "^/edit?insuredId&viewTitle&mode",
                       templateUrl: 'app/insured/edit/insuredEdit.html'
                     }
  }
Community
  • 1
  • 1
epitka
  • 17,275
  • 20
  • 88
  • 141
  • you wanna setup a plucker to explain your problem ? I am working on this too. I pretty much get what I want. – maxisam Oct 15 '14 at 16:32

0 Answers0