D8 - How to Get Current node object in content view/edit page

$current_node = \Drupal::routeMatch()->getParameter('node');

Comments