Пікірлер
@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?
@danprash
@danprash 6 жыл бұрын
You explained very very efficiently. Thanks will try with Drupal module
@MyDanny112
@MyDanny112 7 жыл бұрын
how come you don't have to put <div ng-app =""> 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 <div ng-app="yourModuleName"> and remove the jQuery in the js file