Combine ng-admin and ui-router

Issue

I have AngularJS(1.4.9) project that is build with usage of ui-router and have few states like this:

.state('overview', {
  url: '/overview',
  parent: 'dashboard',
  templateUrl: 'views/dashboard/overview.html'
})
.state('settings', {
  url: '/settings',
  parent: 'dashboard',
  templateUrl: 'settings/views/index.html',
  controller: "SettingsCtrl"
})

Now I want to add want to integrate ng-admin(0.9.1) to it. I have tested it as standalone app with standalone html as described in docs and it works. But I couldn’t find a way to add it to current project.

Solution

My ‘just works’ solution is to add to main project states external link of ng-admin:

  .state('database', {
      onEnter: function($window) {
          $window.open('/ng-admin/ng-admin.html', '_self');
      }
  })

Answered By – ephemerr

Answer Checked By – Clifford M. (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.