0

I have a css and js files, i want to use it and call it from controller, for js these lines work perfectly:

$serverUrl = $this->baseUrl(); $headScript = $this->getServiceLocator()->get('viewhelpermanager')->get('inlineScript'); $headScript->appendFile($serverUrl . '/assets/js/file.js');

But for css when i use these lines :

 $serverUrl = $this->baseUrl();
     $headScript = $this->getServiceLocator()->get('viewhelpermanager')->get('inlineStyle');
     $headScript->appendFile($serverUrl . '/assets/js/file.css');

i have this error:

Zend\View\HelperPluginManager::get was unable to fetch or create an instance for inlineStyle

1 Answer 1

0

Try to use “headLink” instead of “inlineStyle”.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.