Search code examples
angularjsangularjs-directiveswig-template

Angular with SWIG middleware


I have small problems with using {{}} on both sides. For example {{}} in content of tag i could change to ng-bind-html="Content" but for example when i have ng-src attribute and i need to load data from variable how i would success that? If there any middleware like SWIG, just with for example {{{}}} use or something like that? Middleware i need it html like middle ware. Perhaps SWIG could change {{}} to something else and work with that?


Solution

  • You can change either SWIG or Angular to use something else - here's an example of changing SWIG and an article.

    swig.setDefaults({ varControls: ['<%=', '%>'] });
    

    https://thesagaciouscoder.wordpress.com/2014/09/02/making-swig-and-angular-play-along/