Jarves\Admin\AdminAssets::appendAngularTemplates PHP Method

appendAngularTemplates() public method

    public function appendAngularTemplates()
    {
        $response = $this->pageStack->getPageResponse();
        foreach ($this->jarves->getConfigs() as $bundle) {
            $templates = $bundle->getAdminAngularTemplatesInfo();
            foreach ($templates as $template) {
                $publicPath = $this->jarves->resolvePublicWebPath($template->getPath());
                $localPath = $this->jarves->resolveInternalPublicPath($template->getPath());
                $content = file_get_contents($localPath);
                $content = str_replace('</script>', '', $content);
                $response->addHeader('<script type="text/ng-template" id="' . $publicPath . '">' . $content . '</script>');
            }
        }
    }