GithubHelp home page GithubHelp logo

astik / angular-combine Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 5.0 49 KB

Allow loading of merge templates into a single HTML file.

License: MIT License

JavaScript 52.82% CSS 1.58% HTML 45.60%
angularjs template performance partials combine angular javascript html templatecache

angular-combine's People

Contributors

astik avatar brandonkboswell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-combine's Issues

A question regarding the template compile.

Hey @astik :)
Great work on this module.

When this code run:

$injector.get("$compile")(response.data)

Are all the "internal" templates (within the combined template) pushed to the $templateCache?
If the compile function does not push them into the $templateCache, i really wonder how this actually works, assuming a directive tries to use one of the internal templates within the combined template file.

Thanks!!

Compatibility with AngularJS 1.3 (undefined is not a function in `defaultHttpResponseTransform`)

Hi,

I've similar module in my project. It is working fine until I upgrade to AngularJS 1.3, after which the script is throwing below error:

TypeError: undefined is not a function
    at defaultHttpResponseTransform (http://localhost:9080/js/lib/angular/angular.js:8569:27)
    at http://localhost:9080/js/lib/angular/angular.js:8517:12
    at forEach (http://localhost:9080/js/lib/angular/angular.js:335:20)
    at transformData (http://localhost:9080/js/lib/angular/angular.js:8516:3)
    at transformResponse (http://localhost:9080/js/lib/angular/angular.js:9224:23)
    at processQueue (http://localhost:9080/js/lib/angular/angular.js:12914:27)
    at http://localhost:9080/js/lib/angular/angular.js:12930:27
    at Scope.$eval (http://localhost:9080/js/lib/angular/angular.js:14123:28)
    at Scope.$digest (http://localhost:9080/js/lib/angular/angular.js:13939:31)
    at Scope.$apply (http://localhost:9080/js/lib/angular/angular.js:14227:24)

This could be related to angular/angular.js#2973 (also, report here nervgh/angular-file-upload#272) - not sure though.

Fix for this simple - we need to return headers too from the combinedTplPromise.then function, like below:

combinedTplPromise.then(function(response) {
    return {
        status: response.status,
        data: origGetMethod(url),
        headers: response.headers
        };
});

Hope this will be useful to someone else.

Let me know if you wanted me to open a pull request.

using angular combine with directive tags

Hi, I'm using directives like:

return {
            restrict: 'E',
            templateUrl: function (element, attr) {
            	return 'App/components/shared/cart/cart.html';
            },
            controller: 'cart.controller',
            controllerAs: 'cart',
            link: function (scope, element, attrs) {

            }
        };

and in my html I'll use:

<cart></cart>

I was wondering, can I use angular combine to bundle html files in this case?

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.