I started to work on existing project writed in angular. What is mysterious for me is that in HTML is not used anything from angular.
<div id="chat">
<div data-id="6863" data-name="patrik.valkovic"></div>
</div>
Then is just called bootstrap
angular.bootstrap(document.getElementById('chat'), ['drahak.chat'])
Run method of module calls only GET request and connects to socket
drahak.chat.run([
'Socket', '$http', 'host', 'port', function (Socket, $http, host, port) {
$http.get('http://' + host.slice(5) + ':' + port + '/config')
.then(function (config) {
return drahak.chat.emoticons = config.data.emoticons;
});
return Socket.on('events:batch', EventsBatchCallback);
}
]);
But when I visit this site, it generate while template from separate file.
What is this possible? Is angular responsible for this or is code somewhere else, that i don't find it?
EDIT: Routes are not used.
So i finally figured it out. In inner div is also "data-token" attribute and "token" directive was registered. I don't realize that angular could also chain with "data-" attribute (without ng-). That directive replace that element with template.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.