Search code examples
javascriptangularjslinemanjs

What is JST in angular template?


Recently I came across a code chunck where JST is added before the template in angular -

Example -

$routeProvider .when("/login", { template: JST["app/templates/login"], controller: "LoginController" })

Previously, I do like this -

$routeProvider .when("/login", { template: "app/templates/login", controller: "LoginController" })

what is this JST in angular template means? also the difference between the two styles if any?

FYI - Its a code in app made from linemanjs.


Solution

  • It possibly could be an hash object in your code containing all keys and values as template urls for html files.

    var JST = {
        "app/templates/login":"something.html"
    };
    
    $routeProvider
        .when("/login", {
            template: JST["app/templates/login"],
            controller: "LoginController"
        })