question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom page Not Found

See original GitHub issue

I would like to add a custom page as seen in the blog example.

Here is my code:

var myApp = angular.module('myApp', ['ng-admin'])

// ng-admin config
myApp.config(['NgAdminConfigurationProvider', function (nga) {
  var admin = nga.application('Test Admin');

  admin.menu(nga.menu().addChild(nga.menu().title('Billing').link('/billing')));

  nga.configure(admin);
}]);

// billing controller
myApp.controller('billingController', ['$scope', function($scope) {
  $scope.errorMessage = 'billing error';
}]);

// billing state
var tpl = '<div>BILLING</div><div>' +
  '<div ng-if="errorMessage != \'\'">Error: {{errorMessage}}</div>';

myApp.config(['$stateProvider', function($stateProvider) {
  $stateProvider
    .state('billing', {
      parent: 'ng-admin',
      url: '/billing',
      template: tpl,
      controller: 'billingController'
    });
}]);

If I click on “Billing” in the menu, I have this message:

Not Found The page you are looking for cannot be found. Take a break before trying again.

If I comment parent: 'ng-admin',, my page is displayed but not included into ng-admin.

Do you have any idea of what I’m doing wrong?

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eduprecommented, Dec 12, 2016

My version: "ng-admin": "^1.0.0-alpha2" Thanks to the upgrade note I fix my issue with: parent: 'main', I think we can close it.

0reactions
Phoceacommented, Dec 12, 2016

Thanks for the feedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create a Great Custom 404 Error Page (with Examples)
How to Create a Custom 404 Error Page · Step 1: Design the Page · Step 2: Configure the Server · Step 3:...
Read more >
Creating an HTML 404! Error Web Page - Udacity
When an HTTP 404 appears on your screen, it means that although the server is reachable, the specific page you are looking for...
Read more >
A Beginners Guide to Custom 404 Pages - LCN.com
A Beginners Guide to Custom 404 Pages ... 404 is an error that is displayed when the server fails to locate the page...
Read more >
How to make a custom 404 error page for your website - Medium
Try to look for a page that does not exist on your website. You should get your custom 404 page that you denoted...
Read more >
How To Create A Custom 404 Page In WordPress
Step 1: Go to Appearance > Theme File Editor in the WordPress dashboard. · Step 2: Select your theme in the dropdown menu...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found