Can one host an angular.js based static blog on Github?

前端 未结 3 1460
孤独总比滥情好
孤独总比滥情好 2020-12-23 04:44

I know one can host a Jekyl based static site/blog via Github pages. Can one do the same with a static site/blog based on AngularJS?

3条回答
  •  太阳男子
    2020-12-23 05:38

    There is one conflict between Jekyll and Angular to be aware of.

    Liquid, which is included in Jekyll also uses {{ }} for evaluating expressions. To change the expressions that angular interprets (so it doesn't conflict with Liquid) use:

    var myapp;
    myApp = angular.module('myApp', []);
    
    myApp.config([
      '$interpolateProvider', function($interpolateProvider) {
        return $interpolateProvider.startSymbol('{(').endSymbol(')}');
      }
    ]);
    

    Check out this blog post

提交回复
热议问题