New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.base doesn't work when setting resources.Angular.base in application config #1

Closed
Cahdek opened this Issue Aug 18, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@Cahdek
Contributor

Cahdek commented Aug 18, 2016

Documentation says to set .base in application config. Since this is a fork of the ZendX_Jquery_Component, the correct value should be resources.Angular.localpath OR change the switch statement to look for base instead of localpath

@Cahdek

This comment has been minimized.

Show comment
Hide comment
@Cahdek

Cahdek Aug 18, 2016

Contributor

Additionally, setting localpath isn't being parsed correctly.

Setting resources.Angular.localpath = "/js/angular", you get a script tag as
<script src="/js/angular"></script>

Additional plugins are loading correctly, but the base angular is not.

Fixed this by changing:

protected function _getAngularLibraryPath()
    {
        if($this->_angularLibraryPath != null) {
            $source = $this->_angularLibraryPath;

to

protected function _getAngularLibraryPath ()
    {
        if ($this->_angularLibraryPath != null) {
            $source = $this->_angularLibraryPath .
                     ($this->_minified == true ? AngularZF1_Angular::CDN_ANGULAR_MIN_PATH_GOOGLE : AngularZF1_Angular::CDN_ANGULAR_PATH_GOOGLE);

in Angular/View/Helper/Angular/Container.php

Contributor

Cahdek commented Aug 18, 2016

Additionally, setting localpath isn't being parsed correctly.

Setting resources.Angular.localpath = "/js/angular", you get a script tag as
<script src="/js/angular"></script>

Additional plugins are loading correctly, but the base angular is not.

Fixed this by changing:

protected function _getAngularLibraryPath()
    {
        if($this->_angularLibraryPath != null) {
            $source = $this->_angularLibraryPath;

to

protected function _getAngularLibraryPath ()
    {
        if ($this->_angularLibraryPath != null) {
            $source = $this->_angularLibraryPath .
                     ($this->_minified == true ? AngularZF1_Angular::CDN_ANGULAR_MIN_PATH_GOOGLE : AngularZF1_Angular::CDN_ANGULAR_PATH_GOOGLE);

in Angular/View/Helper/Angular/Container.php

@Awnage

This comment has been minimized.

Show comment
Hide comment
@Awnage

Awnage Aug 19, 2016

Owner

Awesome to see someone else benefiting from this. If you make a pull request, I am sure @bignall will have a look and give you the thumbs up.

Owner

Awnage commented Aug 19, 2016

Awesome to see someone else benefiting from this. If you make a pull request, I am sure @bignall will have a look and give you the thumbs up.

@Cahdek

This comment has been minimized.

Show comment
Hide comment
@Cahdek

Cahdek Aug 19, 2016

Contributor

Thanks! I've submitted the pull request. Glad I found this plugin! Great job!

Contributor

Cahdek commented Aug 19, 2016

Thanks! I've submitted the pull request. Glad I found this plugin! Great job!

@bignall

This comment has been minimized.

Show comment
Hide comment
@bignall

bignall Aug 21, 2016

Collaborator

Thanks so much! I'm glad to see it helping more people! Thanks for the merge request with the fixes. I'll get it merged.

Collaborator

bignall commented Aug 21, 2016

Thanks so much! I'm glad to see it helping more people! Thanks for the merge request with the fixes. I'll get it merged.

@bignall

This comment has been minimized.

Show comment
Hide comment
@bignall

bignall Aug 24, 2016

Collaborator

Closing with merged pull request

Collaborator

bignall commented Aug 24, 2016

Closing with merged pull request

@bignall bignall closed this Aug 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment