0
我正在使用LinkedIn API,我需要加載他們的登錄腳本,當我的用戶擊中某個路線。但是,從我讀過的stackoverflow中,不可能只將腳本元素放入部分內部。 我的代碼是直截了當:角度加載LinkedIn腳本部分
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-route.js">
...
<script src="http://platform.linkedin.com/in.js">
api_key: ...
authorize: true
onLoad: onLinkedInLoad
</script>
<script type="in/Login">
Hello, <?js= firstName ?> <?js= lastName ?>.
</script>
<script src="js/linkedinFuncs.js"></script>
</div>
的最後3個腳本(在LinkedIn的)只需要當用戶點擊「登錄」路線包括在內。有什麼想法嗎?
東西你嘗試把你的腳本部分從您的相關congtroller代碼加載路由器升在你的頁面的ng-view部分添加? – michael