0

Работая над проектом, столкнулся с такими конструкциями:

import * as Constants from '../../../constants';
import Controller from './lesson-schedule.controller';

export const NAME = 'eduLessonSchedule';

const COMPONENT: ng.IComponentOptions = {
    require: {
        headerCtrl: '^^nituHeader'
    },
    controller: Controller,
    templateUrl: Constants.ComponentsPath
    + '/schedule/lesson-schedule/lesson-schedule.template.html'
}

export default {
    Name: NAME,
    Component: COMPONENT
};

Не понимаю как работает require, и что такое '^^someText',

еще вот:

require: {
        'tabCtrl': '?^nituTab',
        'scheduleCtrl': '?^^eduLessonSchedule'
    },

1 ответ 1

0

ответ нашел, это подключение контроллера другой компоненты:

https://demisx.github.io/angularjs/directives/2014/11/25/angular-directive-require-property-options.html

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.