Possible to create an application with Angularjs without Nodejs?

Asked

Viewed 528 times

1

I am interested in Angularjs, after having seen some examples of its use. I would like to explore this framework.

In most of the tutorials I’m following it all starts with the installation of Nodejs.

And must have the Nodejs installed to create a app with Angularjs ?

1 answer

3


Yes, it is possible.

Probably the tutorials you have seen ask for the installation of Nodejs to be able to use NPM (which is the Node package manager).

You can simply download Angular from another package manager or download the file(s) directly. Take a look at official website of Angularjs.

It is also possible to add Angular for a CDN, see the example below.

angular.module('hello-app', []);

angular.module('hello-app').controller('mainController', mainCtrlFn);

function mainCtrlFn(){
  this.hello = "Olá, mundo";
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>

<div ng-app="app-teste" ng-controller="mainController as ctrl">
    {{ctrl.hello}}
</div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.