Answer the question
In order to leave comments, you need to log in
How to display data in Pug from Angular?
Hi all.
There is a template on Pug
doctype html
html(ng-app='app')
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
script(src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js')
script(src='/angular/p.js')
body(ng-controller='cont')
block content
h1(ng-repeat='v in data.vals') {{v}}
angular.module('app',[]);
angular.module('app').controller('cont', function($scope) {
$scope.data = {
vals: [ '1', '2', '3' ];
};
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question