diff --git a/packages/jinja/CHANGELOG.md b/packages/jinja/CHANGELOG.md index 08573b33..fcfcc234 100644 --- a/packages/jinja/CHANGELOG.md +++ b/packages/jinja/CHANGELOG.md @@ -3,6 +3,7 @@ ## 8.0.0 * Require Dart >= 3.0 +* Update `jinja` to 0.4.2 ## 7.0.0 diff --git a/packages/jinja/lib/angel3_jinja.dart b/packages/jinja/lib/angel3_jinja.dart index 572244ef..10a15fa0 100644 --- a/packages/jinja/lib/angel3_jinja.dart +++ b/packages/jinja/lib/angel3_jinja.dart @@ -1,5 +1,6 @@ import 'package:angel3_framework/angel3_framework.dart'; import 'package:jinja/jinja.dart'; +import 'package:jinja/loaders.dart'; /// Configures an Angel server to use Jinja2 to render templates. /// @@ -28,7 +29,7 @@ AngelConfigurer jinja({ createLoader ??= () { return FileSystemLoader( extensions: ext, - path: path, + paths: [path], followLinks: followLinks, ); }; @@ -47,7 +48,7 @@ AngelConfigurer jinja({ ); app.viewGenerator = (path, [values]) { - return env.getTemplate(path).render.renderMap(values) as String; + return env.getTemplate(path).render(values); }; }; }