How to use the ember-ast-hot-load/utils/normalizers.getPossibleRouteTemplateMeta function in ember-ast-hot-load

To help you get started, we’ve selected a few ember-ast-hot-load examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lifeart / ember-ast-hot-load / addon / services / hot-loader.js View on Github external
willLiveReloadRouteTemplate(attrs) {
    const meta = getPossibleRouteTemplateMeta(attrs.modulePath);
    if (meta.looksLikeRouteTemplate) {
      attrs.cancel  = true;
      this.clearRequirejs(meta.possibleTemplateName);
    }
  },
  __isAlive() {
github lifeart / ember-ast-hot-load / addon / services / hot-loader.js View on Github external
willHotReloadRouteTemplate(attrs) {
    const meta = getPossibleRouteTemplateMeta(attrs);
    if (!meta.looksLikeRouteTemplate) {
      return;
    }
    const currentRouteName = this.hasActiveRoute() ? this.currentRouteName() : '';
    if (meta.maybeClassicPath) {
      this.forgetComponent(meta.possibleTemplateName, false);
      const route = this.routeByPath(meta.possibleRouteName);
      if (!route) {
        return this.reloadWindow();
      }
      if (shouldRenderTemplate(currentRouteName, meta.possibleRouteName)) {
        route.renderTemplate();
      }
    } else if (meta.isMU) {
      let routeName = stripRouteTemplatePrefix(meta.possibleRouteName);
      routeName  = stripRouteTemplatePostfix(routeName);