잘 렌더링 후 초기화, 이것은 약간의 회색 머리카락이 각 초보자를주고있다 :isotope.js는 - 각도가 DOM
$(document).ready(function() {
// ISOTOPE INITIALISATON AND STUFF HERE
를 그리고 모두가 잘 작동하는지 : 자바 스크립트 초기화
내 일반 동위 원소의 외부는 정상처럼 시작 각도없이. 이제 동위 원소 항목이 별도의 portfolio.html 페이지에있어 ng-view div가 포함 된 내 기본 index.html 페이지로로드되기 때문에 동위 원소가 초기화되지 않는 경우가 있습니다.
약 50 명입니다. 내가 동위 원소를 새로 고침하면 작동하지 않습니다. 이것은 DOM을 렌더링 할 각도가 준비되지 않았기 때문입니다. 그래서 준비된 문서를 기다리고 있지만 (그리고 문서로드를 시도한 경우에도) 작동하지 않습니다.
내 index.html 페이지에서 내 portfolio.html 페이지를로드 한 후 내 동위 원소를 만들 수있는 간단한 방법이 있습니까? 내 포트폴리오에는 내 동위 원소 div가 포함되어 있습니까?
주의 사항 각형 동위 원소를 사용하지 않고 표준 metafizzy 동위 원소와 각을 사용합니다.
가능한 단순한 해결책은 훌륭합니다. 어쨌든 Angular가 완료되면 내 동위 원소를 만들어야합니다. 그러나 내 Script.js 파일 (내 Angular 스크립트 파일)에서 내 main.js 파일 (내 동위 원소를 초기화하는 파일)의 메서드를 호출하는 방법
도움이 될 경우 내 각본 스크립트 :
// script.js
// create the module and name it scotchApp
// also include ngRoute for all our routing needs
var scotchApp = angular.module('scotchApp', ['ngRoute']);
// configure our routes
scotchApp.config(function($routeProvider) {
$routeProvider
// route for the home page
.when('/', {
templateUrl : 'pages/home.html',
controller : 'mainController'
})
// route for the about page
.when('/about', {
templateUrl : 'pages/about.html',
controller : 'aboutController'
})
// route for the contact page
.when('/contact', {
templateUrl : 'pages/contact.html',
controller : 'contactController'
});
});
// create the controller and inject Angular's $scope
scotchApp.controller('mainController', function($scope) {
// create a message to display in our view
$scope.message = 'Everyone come and see how good I look!';
});
scotchApp.controller('aboutController', function($scope) {
$scope.message = 'Look! I am an about page.';
});
scotchApp.controller('contactController', function($scope) {
$scope.message = 'Contact us! JK. This is just a demo.';
});
hmmm.hmmmm. 나는 차 한잔 할 때라고 생각한다. 흠. hmm
답장을 기다리십시오!