Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

in express.js when you will pass a value from controller to view, using jade (default in express) you set in controller:

response.render('templatename',{name:'Peter'});

so you can echo it on the view as:

#{name}

In Angular.js you put values you want to show in view to the $scope var, $scope.name = "Peter" and echo it on the view as: {{name}} So, maybe I can`t echo values from node.js directly to angular. then there is a way to echo values from node.js to an js file to be used as angular.js controller?

my target is pass values from node.js server side controllers to angular.js client side controllers

Thanks!

share|improve this question
    
You might want to take a step back and spin through a MEAN tutorial (not necessarily the M part), AngularJS is designed to be a client-oriented framework, e.g., it makes a request to the back end, puts the appropriate values into $scope, and the display happens more or less automagically. – Dave Newton Jun 16 '15 at 17:48

Your question isn't so clear enough. But in Angularjs, you can pass in a scope in the controller and call it in your view template

//controller.js
$scope.name = "Your name";

//index.html
<div>{{name}}</div>

Angular tutorials

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.