5

assemble、 yeoman 、 angularJSを使用してサイトを作成したいと考えています。アセンブルがコンテンツを処理し、AngularJS が REST API を介して動的コンテンツを処理する計画です。この 2 つは互換性がありますか? これはアーキテクチャの適切な選択ですか? 私の懸念は、Assemble が使用するテンプレート エンジン (HandleBars) と、{{}} を使用しているように見える AngularJS と互換性があるかどうかです。調査を始めたばかりですが、同様のアーキテクチャを使用している人々の例を見つけるのに苦労しています。Yeoman で足場を組むにはどうすればよいですか?

4

3 に答える 3

3

私は似たようなことをしており、テンプレート区切り記号の問題を処理するために、angular interpolateProvider を使用して角度の区切り記号を変更しています。

var app = angular.module('app', []).config(function ($interpolateProvider) {

    $interpolateProvider.startSymbol('{%');
    $interpolateProvider.endSymbol('%}');

});

一部のスキャフォールドを実行するときに新しい区切り文字を自動的に使用するように Yeoman を構成できるかどうかはわかりませんが、これがテンプレートをアセンブル テンプレートから分離するのに役立つことを願っています。

于 2014-02-19T03:03:39.863 に答える
1

I've done similar for a client for a retail site, to create a basis, custom CMS.

Originally I had the idea that all the items for sale (the data i.e model) would be represented via the data files - a mix of .json and yaml. (At least the client could edit the yaml file with some ease as it is sort of human readable).

A later improvement was to allow the client to edit the stock via a webpage - rather than editing the data files directly - Angular was ideal for this to have a webapp that basically allowed editing the data / upload and transform images, etc via a much nicer interface.

于 2014-10-23T12:18:44.857 に答える