How can I initialize a variable in controller from a view (for example
fetching in from ASP.NET model)? Something like below:
var app = angular.module("app", []);
app.controller("appCtrl", function ($scope) {
$scope.myvar;
and in html file:
<div ng-app="app" ng-controller="appCtrl">
{{myvar = 5}}
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.