Skip to content
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

filepath.strip is not a function #90

Open
winnemucca opened this issue Mar 11, 2016 · 3 comments
Open

filepath.strip is not a function #90

winnemucca opened this issue Mar 11, 2016 · 3 comments

Comments

@winnemucca
Copy link

I am leaning heavily on cacheIdFromPath to see why my files which show up in the debugger are not showing up in the tests.

I am having no problem using the commented out part to set a path (but still cannot test my directives). For some reason the path wants to go all the way back to my directory.

I was trying filepath.strip, but I keep getting an error filepath.strip is not a function. This is odd because I am copying it exactly from the documentation. Is this a bug with angular 1.5 and bard.js or is there more to setting up filepath.strip


cacheIdFromPath: function (filepath) {
            //console.log('filepath',filepath);

            //var cacheId = filepath.substring(filepath.indexOf('/Templates'));
            //console.log('cacheid',cacheId);

            var cacheId2 = filepath.strip('Templates/', ' ');
            console.log('2', cacheId2);

            return cacheId2;
        },
        moduleName: 'templatesCached'

@Steve-Mc
Copy link

+1

@burka
Copy link

burka commented Jun 8, 2016

filepath is just an ordinary string, so you should use something like filepath.replace.

@akras-apixio
Copy link

Run into it too, pretty sure it's a typo. and they meant replace as burka said ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants