angularjs - pass parameter to Angular directive template function post-post-link, using $scope, GET or whatever -


i trying write directive format content modal display (using bootstrap classes) if given parameter, , standard view if not. have working view loaded directly, toggling on url param (?modal) available $routeparams and/or $location.

i want use toggle-able template "pipe" other templates. however, intended content url never visible url when used modal. can't working when loading view $modal.open or nginclude, because $routeparams/$location has data including page, not included one.

i put in plunker, because plunker doesn't provide url param, modal view isn't available.

does angular provide means change template or templateurl later in process? example, use $scope, either controller or on directive, itself?

clarification: goal here have one template/partial each component, template used either standalone or modal, based on switch. _modal , _alone partials in plunker convert component template desired state.

$modal.open takes single object parameter 1 of properties of config parameter templateurl

http://angular-ui.github.io/bootstrap/

so can create config object , open modal template need.

dan wahlin uses technique dialog service , in article goes on demonstrate full modal service

http://weblogs.asp.net/dwahlin/building-an-angularjs-modal-service


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -