tag inside html partial", "text": "

'</>' should be split into You mean the -tags that you use in your templates? We use the js-string-escape m", "dateCreated": "undefined", "upvoteCount":0, "url": "https://githubhelp.com//miickel/gulp-angular-templatecache/issues/60#66651487", "author": { "@type": "Person", "name": "miickel" } } , { "@type": "Answer", "text": "

js-string-escape guys can't implement this technicall", "dateCreated": "undefined", "upvoteCount":0, "url": "https://githubhelp.com//miickel/gulp-angular-templatecache/issues/60#66678358", "author": { "@type": "Person", "name": "sashasochka" } } , { "@type": "Answer", "text": "

Yeah, I think you should avoid inlining the JS anyway. I'll reopen this if more develo", "dateCreated": "undefined", "upvoteCount":0, "url": "https://githubhelp.com//miickel/gulp-angular-templatecache/issues/60#66686420", "author": { "@type": "Person", "name": "miickel" } } ] } }

GithubHelp home page GithubHelp logo

Comments (3)

miickel avatar miickel commented on June 23, 2024

You mean the script-tags that you use in your templates? We use the js-string-escape module to manipulate the templates before putting them in the $templateCache. It's up to the maintainers of that module to add this fix, I guess. However, if more users of this plugin are experiencing similar issues, I'd be happy to include a fix for it here instead.

from gulp-angular-templatecache.

sashasochka avatar sashasochka commented on June 23, 2024

js-string-escape guys can't implement this technically and, even more, they shouldn't.

  1. They return a string. In our case we actually need a string splitted in two with javascript's + operator. We're fighting with syntax parsing problems here and they can't return a syntactic construction.
  2. Not all js-string-escape users would even want this feature as not everybody tries to embed generated string into html code (as inlined js).

The fix is actually as simple as regex substitution.

In my case I ended-up with a different solution - I just don't inline my JS code.

from gulp-angular-templatecache.

miickel avatar miickel commented on June 23, 2024

Yeah, I think you should avoid inlining the JS anyway. I'll reopen this if more developers request something similar.

from gulp-angular-templatecache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.