Having a angular-app like
angular.module('app', []);
and trying to instanciate angular through:
<div id="app-container" data-ng-app="app">
<div data-ng-controller="appController">
<div id="calendar"></div>
</div>
</div>
results in:
To fix it, I need to bootstrap angular manually. Seems to be an issue with loading the angular scripts. I have vendors.js and app.js being loaded this way:Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Angular databinding not working:<ltng:require scripts="{!join(',', $Resource.MyResource+ '/scripts/vendor.js', $Resource.MyResource+ '/scripts/app.js')}"/>
For example I have this controller:
angular
.module('app')
.controller('appController', function($scope, $log){
$scope.hello = 'Hallo';
})
And my view looks like:
The view should render the word 'Hallo'.But it still remains in {{hello}}.Another thing is, that the way angular provides including templates with data-ng-include and paths doesn't also work:<div data-ng-controller="appController">
{{hello}}
</div>
app/hello.html is stored in the angular template provider.<div data-ng-include="'app/hello.html'"></div>
This results in following:
<!-- ngInclude: 'app/hello.html' -->
But the content of hello.html is never rendered in the DOM.
Does anyone has experienced similar behaviour or has some ides how to fix them?Thanks in advance!RegardsFloRefer https://developer.salesforce.com/blogs/developer-relations/2017/02/lockerservice-lightning-container-third-party-libraries-lightning-components.htmlAngular is not supported in LockerService, are you using "Lightning Container Component" ?