user1853128
user1853128

Reputation: 1114

Load template on click angular

Have tried loading the template on click of the button but some where approach is wrong templates are not loading.

Here adding the tried plunker:

Plunker

Can anyone let me know where had gone wrong.

Upvotes: 1

Views: 2744

Answers (1)

Mritunjay
Mritunjay

Reputation: 25892

I think problem is following:

You haven't called the function. you have to say cClick().

You said:-

<button ng-model='template' ng-click='cClick'>Click</button>

try this:-

<button ng-model='template' ng-click='cClick()'>Click</button>

Upvotes: 1

Related Questions