How to use AngularJS in Drupal

  Рет қаралды 2,947

Pankaj Bhagat

Pankaj Bhagat

Күн бұрын

Obejctive: Write a Drupal Module that generates an angularjs page
Why do you need it? If you know the potential of angularjs you would know it
For instance, if you want to program on the output of multiple Drupal Views output, you can do it through ng.
Assumptions: You know how to write a Drupal Module, and you know a bit of angularjs
What this code does: It reads a Drupal Views's json output and displays it in a table through angularjs.
Q:) But why we need ng if Drupal itself can output in a table.
A): Seems you have not yet understood angularjs. It makes a faceless Drupal... you dont have to use a drupal theme. You offload progracessing load to browser.And if you know angularjs you will have more points to add to what I have mentioned.

Пікірлер: 5
@danprash
@danprash 6 жыл бұрын
You explained very very efficiently. Thanks will try with Drupal module
@romansocorro3523
@romansocorro3523 6 жыл бұрын
I followed this one tutorial "Creating your application with ADF" to just use the Alfresco Content Services, now I'm planning to add/use this Alfresco's Angular Component into my Drupal 7 Website, maybe as a web page, or even as a block, I'm really not sure on how to deal with this one because I'm both new to it. Any thoughts or help? What would be the best approach or way to make it work? Can I use AngularJS for this one?
@MyDanny112
@MyDanny112 7 жыл бұрын
how come you don't have to put in yout tpl.php? to have angularjs work? but for me, mine will not work without it?
@pankajbhagat01
@pankajbhagat01 7 жыл бұрын
Glad that you asked this. There are two ways to link your page (or part of ) to the angular application. 'ng-app' directive does the automatic way. While using 'angular.bootstrap' is a manual way. I am not sure if I have explained it in the video. But you can refer to the In the video at 11:56 which shows file sdcamp.js. See line 24... here I use angular.bootstrap... I do this by using jQuery which gets the id 'camp-app' and then plug-in angular app manully using angluar.bootstrap. See my tpl.php file (in 13:45) the div on line 1 has id 'camp-app'. so effectively I am doing same as what ng-app would do.
@pankajbhagat01
@pankajbhagat01 7 жыл бұрын
Alternatively, the simpler way is to just add and remove the jQuery in the js file
If Your Tech Job is Comfortable, You're in Danger
20:57
Thriving Technologist
Рет қаралды 25 М.
T Mobile Home Internet Review: Testing 5G Speeds
4:31
The Senior List
Рет қаралды 21
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 114 МЛН
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,9 МЛН
MY HEIGHT vs MrBEAST CREW 🙈📏
00:22
Celine Dept
Рет қаралды 42 МЛН
Building a MONSTER Editing PC for Faster Renders | Prores & BRAW
38:01
Is your trademark STRONG or WEAK?
11:44
Faith Mitton, Esq.
Рет қаралды 212
Forbidden Northridge With RPK | Arena breakout S6
23:04
ikeriri products walkthrough in CEATEC Japan 2024
4:49
ikeriri network service いけりりネットワークサービス
Рет қаралды 90
БАБУШКА ВСЁ ИСПОРТИЛА #shorts
0:24
Паша Осадчий
Рет қаралды 755 М.
Покрасила ЛЕДИ БАГ 🤣
0:43
ANDRUS
Рет қаралды 2,3 МЛН
Берегите своих животных 💔💔💔
0:35
REALCEASE
Рет қаралды 11 МЛН
МЕДИНА ҮМІТКЕР БОЛЫП КЕЛДІ😱 Бір Болайық! 16.10.24
52:42
Бір болайық / Бир Болайык / Bir Bolayiq
Рет қаралды 249 М.